From 63276ffd081ea0e1de208382bb8c694733e97f90 Mon Sep 17 00:00:00 2001 From: ChrQR Date: Thu, 30 May 2024 00:50:53 +0200 Subject: [PATCH] cron path --- docker-compose.yaml | 33 +++++++++++++++++---------------- scrapers/Dockerfile | 2 +- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index bc949cf..dcac128 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,26 +2,27 @@ version: "3.8" services: api: - build: - context: ./api - dockerfile: Dockerfile + image: gitea.rannes.dev/rannes.dev/sw-jobs-api:latest + networks: + - traefik-proxy ports: - - "5000:5000" + - "3600:5000" volumes: - - ./scrapers:/app/scrapers + - /appdata/sw-jobs/scrapers:/app/scrapers environment: - FLASK_ENV=production - - client: - build: - context: ./client - dockerfile: Dockerfile - ports: - - "3000:3000" + labels: + - traefik.enable=true + - traefik.http.routers.swJobsRouter.rule=Host(`api.rannes.dev`) + - traefik.http.routers.swJobsRouter.tls=true + - traefik.http.routers.swJobsRouter.entryPoints=https + - traefik.http.routers.swJobsRouter.middlewares=crowdsec-bouncer@docker scraper: - build: - context: ./scrapers - dockerfile: Dockerfile + image: gitea.rannes.dev/rannes.dev/sw-jobs-scraper:latest volumes: - - ./scrapers:/app + - /appdata/sw-jobs/scrapers:/app + +networks: + traefik-proxy: + external: true diff --git a/scrapers/Dockerfile b/scrapers/Dockerfile index afc3e7e..410aa6f 100644 --- a/scrapers/Dockerfile +++ b/scrapers/Dockerfile @@ -33,4 +33,4 @@ COPY run_scraper.sh /usr/local/bin/run_scraper.sh RUN chmod +x /usr/local/bin/run_scraper.sh # Run the command on container startup -CMD ["cron", "-f"] +CMD ["/usr/bin/cron", "-f"]