new template

This commit is contained in:
Christian Lempa 2025-02-18 09:21:08 +01:00
parent 192ede0c86
commit 9d65392432
3 changed files with 15 additions and 37 deletions

View File

@ -4,35 +4,23 @@ services:
image: docker.io/library/nginx:1.26.3-alpine
container_name: nginx
ports:
# --> (Optional) Remove when using traefik...
- 80:80
- 443:443 # <-- (Optional) Remove to disable HTTPS
# <--
- 443:443
volumes:
- ./config/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./data:/usr/share/nginx/html:ro
# --> (Example) Add additional servers for different domains
# - ./config/your-local-service.conf:/etc/nginx/conf.d/your-local-service.conf:ro
# - ./data-2:/usr/share/nginx/html-2:ro
# <--
# --> (Optional) When using traefik...
# labels:
# - traefik.enable=true
# # -- Traefik Services
# - traefik.http.services.nginx.loadbalancer.server.port=80
# # -- Traefik Routers
# - traefik.http.routers.nginx.entrypoints=websecure
# - traefik.http.routers.nginx.rule=Host(`your-web-site-fqdn`)
# - traefik.http.routers.nginx.tls=true
# - traefik.http.routers.nginx.tls.certresolver=cloudflare
# - traefik.http.routers.nginx.service=nginx
# networks:
# - frontend
# <--
labels:
- traefik.enable=true
- traefik.http.services.nginx.loadbalancer.server.port=80
- traefik.http.routers.nginx.entrypoints=websecure
- traefik.http.routers.nginx.rule=Host(`example.com`)
- traefik.http.routers.nginx.tls=true
- traefik.http.routers.nginx.tls.certresolver=cloudflare
- traefik.http.routers.nginx.service=nginx
networks:
- frontend
restart: unless-stopped
# --> (Optional) When using traefik...
# networks:
# frontend:
# external: true
# <--
networks:
frontend:
external: true

View File

@ -4,5 +4,6 @@ server {
location / {
root /usr/share/nginx/html;
index index.html;
access_log on;
}
}

View File

@ -1,11 +0,0 @@
# --> (Example) Add additional servers for different domains
# server {
# listen 80;
# server_name your-domain; # <-- Change this to your domain
# location / {
# root /usr/share/nginx/html-2;
# index index.html;
# access_log on; # <-- (Optional) Change to `off` to disable access log
# }
# }
# <--