51 lines
1.2 KiB
YAML
Executable File
51 lines
1.2 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"
|
|
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
|
|
volumes:
|
|
# Konfiguracja Nginx
|
|
- apps-data:/etc/nginx/conf.d:ro
|
|
- nginx2GB_cache:/var/cache/nginx2GB
|
|
- nginx05GB_cache:/var/cache/nginx05GB
|
|
|
|
# Certyfikaty SSL
|
|
- ${DOCKER_DATA}/letsencrypt:/letsencrypt:rw
|
|
- ${DOCKER_DATA}/letsencrypt-tmp:/var/www/certbot:rw
|
|
|
|
- ${DOCKER_DATA}/nginx-logs:/var/log/nginx:rw
|
|
|
|
command: /bin/sh -c "mkdir -p /var/cache/nginx05GB /var/cache/nginx2GB && nginx -g 'daemon off;'"
|
|
|
|
|
|
volumes:
|
|
nginx2GB_cache:
|
|
driver_opts:
|
|
type: tmpfs
|
|
device: tmpfs
|
|
o: size=2147483648 # 2GB
|
|
nginx05GB_cache:
|
|
driver_opts:
|
|
type: tmpfs
|
|
device: tmpfs
|
|
o: size=536870912 # 512MB
|
|
apps-data:
|
|
external: true
|
|
|
|
networks:
|
|
proxy-net:
|
|
name: proxy-net
|
|
driver: bridge |