services: app: image: ghcr.io/m4rc02u1f4a4/ytrss:latest restart: always environment: MONGODB_HOST: db MONGODB_PORT: 27017 G_API_KEY: ports: - 8080:8080 depends_on: - db # Calls the periodic jobs. Kept apart from the app so it can be replaced, # e.g. by Kubernetes CronJobs, instead of running a scheduler inside the app. updater: image: alpine restart: always environment: APP_URL: http://app:8080 command: - /bin/sh - -c - | echo "0 0 * * * wget -q -O - $${APP_URL}/update/channels" > /var/spool/cron/crontabs/root && \ echo "0 * * * * wget -q -O - $${APP_URL}/update/videos" >> /var/spool/cron/crontabs/root && \ echo "0 0 * * * wget -q -O - $${APP_URL}/clean/videos" >> /var/spool/cron/crontabs/root && \ crond -l 2 -f depends_on: - app db: image: mongo restart: always environment: TZ: Europe/Rome volumes: - ./docker_db:/data/db