diff --git a/scrapy/compose.yaml b/scrapy/compose.yaml index 84e1409..be64944 100644 --- a/scrapy/compose.yaml +++ b/scrapy/compose.yaml @@ -54,6 +54,35 @@ services: networks: - compose_network + scrapy_ui: + image: ${SCRAPY_UI_IMAGE:-ghcr.io/valknarness/scrapy-ui:latest} + container_name: ${SCRAPY_COMPOSE_PROJECT_NAME}_ui + restart: unless-stopped + environment: + TZ: ${TIMEZONE:-Europe/Berlin} + NODE_ENV: production + SCRAPYD_URL: ${SCRAPY_UI_SCRAPYD_URL:-https://scrapy.pivoine.art} + SCRAPYD_USERNAME: ${SCRAPY_UI_SCRAPYD_USERNAME} + SCRAPYD_PASSWORD: ${SCRAPY_UI_SCRAPYD_PASSWORD} + networks: + - compose_network + labels: + - 'traefik.enable=${SCRAPY_TRAEFIK_ENABLED}' + - 'traefik.http.middlewares.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-redirect-web-secure.redirectscheme.scheme=https' + - 'traefik.http.routers.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web.middlewares=${SCRAPY_COMPOSE_PROJECT_NAME}-ui-redirect-web-secure' + - 'traefik.http.routers.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web.rule=Host(`${SCRAPY_TRAEFIK_HOST}`) && PathPrefix(`/ui`)' + - 'traefik.http.routers.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web.entrypoints=web' + - 'traefik.http.routers.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web-secure.rule=Host(`${SCRAPY_TRAEFIK_HOST}`) && PathPrefix(`/ui`)' + - 'traefik.http.routers.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web-secure.tls.certresolver=resolver' + - 'traefik.http.routers.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web-secure.entrypoints=web-secure' + - 'traefik.http.middlewares.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-stripprefix.stripprefix.prefixes=/ui' + - 'traefik.http.middlewares.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-auth.basicauth.users=${SCRAPY_AUTH_USERS}' + - 'traefik.http.middlewares.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web-secure-compress.compress=true' + - 'traefik.http.routers.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web-secure.middlewares=${SCRAPY_COMPOSE_PROJECT_NAME}-ui-auth,${SCRAPY_COMPOSE_PROJECT_NAME}-ui-stripprefix,${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web-secure-compress' + - 'traefik.http.services.${SCRAPY_COMPOSE_PROJECT_NAME}-ui-web-secure.loadbalancer.server.port=3000' + - 'traefik.docker.network=${NETWORK_NAME}' + - 'com.centurylinklabs.watchtower.enable=${WATCHTOWER_LABEL_ENABLE}' + volumes: scrapyd_data: name: ${SCRAPY_COMPOSE_PROJECT_NAME}_scrapyd_data