proxy-nginx/deploy-this/deploy-dc.yml

50 lines
1.0 KiB
YAML
Executable File

services:
proxy-nginx:
image: nginx-with-tools
container_name: proxy-nginx
restart: unless-stopped
networks:
- proxy-net
environment:
TZ: Europe/Warsaw
NGINX_ENVSUBST_TEMPLATE_DIR: /etc/nginx/templates
NGINX_ENVSUBST_OUTPUT_DIR: /etc/nginx/conf.d
NGINX_CACHE_DISK_PATH: "/var/cache/nginx" # Nowa zmienna
ports:
- "80:80"
- "443:443"
volumes:
# Konfiguracja Nginx
- apps-data:/etc/nginx/conf.d:ro
# Cache
- type: tmpfs
target: /var/cache/nginx
tmpfs:
size: 2147483648 # 2GB w bajtach
mode: 1777
# Certyfikaty SSL
- ${DOCKER_DATA}/letsencrypt:/letsencrypt:rw
- ${DOCKER_DATA}/letsencrypt-tmp:/var/www/certbot:rw
# Logi
- ${DOCKER_DATA}/nginx-logs:/var/log/nginx:rw
healthcheck:
test: ["CMD", "nginx", "-t"]
interval: 30s
timeout: 10s
retries: 3
volumes:
apps-data:
external: true
networks:
proxy-net:
name: proxy-net
driver: bridge