Skip to content

Instantly share code, notes, and snippets.

@naviarh
Created February 13, 2022 13:21
Show Gist options
  • Save naviarh/52217ad950c827cddaeadc0d6c6541b8 to your computer and use it in GitHub Desktop.
Save naviarh/52217ad950c827cddaeadc0d6c6541b8 to your computer and use it in GitHub Desktop.
version: "3"
services:
web:
image: nginx
volumes:
- "./nginx/templates:/etc/nginx/templates"
- "./html:/usr/share/nginx/html:ro"
#environment:
#- NGINX_HOST=nginx.picsor.ru
#- NGINX_PORT=80
labels:
# https access for domain
- "traefik.enable=true"
- "traefik.http.routers.nginx-https.rule=Host(`nginx.picsor.ru`)"
- "traefik.http.routers.nginx-https.entrypoints=websecure"
- "traefik.http.routers.nginx-https.tls.certresolver=myresolver"
- "traefik.http.routers.nginx-https.middlewares=gzip,sslheader,limit"
# middlewares
- "traefik.http.middlewares.gzip.compress=true"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.middlewares.limit.buffering.memRequestBodyBytes=20971520"
- "traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=20971520"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment