version: '1' networks: frontend: external: true services: website: image: nginx:latest restart: always volumes: - '/hdd/ai-deadlines/html:/usr/share/nginx/html:ro' networks: - frontend updater: # Build the image from your Dockerfile.updater image: alpine_git_python restart: unless-stopped volumes: # Mount the same volume as Nginx so the updater can write to it - '/hdd/ai-deadlines:/app' # You might also want to mount your script if you want to edit it without rebuilding the image # - ./your_update_script.sh:/app/your_update_script.sh:ro command: sh -c "cd /app; while true; do /app/make_website.sh; sleep 3600; done" # Run every hour (3600 seconds) # If your update script needs to connect to the internet (e.g., for git clone, API calls), # it needs network access, which is usually provided by default by Docker Compose's bridge network. # If it needs to interact with your Nginx or other services, they'll be on the same default network.