47 lines
877 B
YAML
Executable File
47 lines
877 B
YAML
Executable File
services:
|
|
proxy-nginx:
|
|
image: nginx-with-tools
|
|
container_name: proxy-nginx
|
|
restart: unless-stopped
|
|
networks:
|
|
- proxy-net
|
|
|
|
environment:
|
|
TZ: Europe/Warsaw
|
|
|
|
|
|
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
|
|
|
|
# Certyfikaty SSL
|
|
- ${DOCKER_DATA}/letsencrypt:/etc/letsencrypt:ro
|
|
- ${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 |