Files
webpage/compose.yml
2026-03-01 20:21:35 +00:00

39 lines
1.5 KiB
YAML

services:
webpage:
#image: nginx:alpine
build:
context: .
args:
HUGO_BASEURL: https://${DOMAIN_MAIN}/ # Nimmt den Wert aus deiner .env
container_name: webpage
restart: unless-stopped
command: /bin/sh -c "envsubst '\$$TOKEN' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
#command: /bin/sh -c "envsubst < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
environment:
- TOKEN=${OPEN_WEBUI_TOKEN}
# - TITLE=${TITLE}
# - DOMAIN_MAIN=${DOMAIN_MAIN}
# - NGINX_ENVSUBST_OUTPUT_DIR=/usr/share/nginx/html
#volumes:
# - ./html/index.html:/usr/share/nginx/html/index.html:ro
# - ./html/style.css:/usr/share/nginx/html/style.css:ro
# - ./html/script.js:/usr/share/nginx/html/script.js:ro
# Wir mounten das Template - Nginx macht daraus beim Start die echte index.html
#- ./html/index.html.template:/etc/nginx/templates/index.html.template:ro
#- ./html/crl.pem:/usr/share/nginx/html/crl.pem:ro
#- ./nginx/crl.conf:/etc/nginx/conf.d/crl.conf:ro
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.webpage.rule=Host(`${DOMAIN_MAIN}`)"
- "traefik.http.routers.webpage.entrypoints=websecure"
- "traefik.http.routers.webpage.tls.certresolver=myresolver"
- "traefik.http.services.webpage.loadbalancer.server.port=80"
networks:
proxy:
external: true