Files
Docker-Setups/tobias-website.yaml
2025-11-29 09:16:11 +01:00

29 lines
1.0 KiB
YAML

version: '1.1'
networks:
frontend:
external: true
services:
website:
image: nginx:latest
restart: always
volumes:
- '/hdd/tobias-website/public:/usr/share/nginx/html:ro'
networks:
- frontend
updater:
# Build the image from your Dockerfile.updater
image: alpine-hugo
restart: unless-stopped
volumes:
# Mount the same volume as Nginx so the updater can write to it
- '/hdd/tobias-website:/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/build_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.