Create tobias-website.yaml

This commit is contained in:
Tobias Nauen
2025-11-29 09:16:11 +01:00
committed by GitHub
parent 8a3c8a4209
commit efe4d12b3d

28
tobias-website.yaml Normal file
View File

@@ -0,0 +1,28 @@
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.