25 lines
633 B
YAML
25 lines
633 B
YAML
version: '3.5'
|
|
services:
|
|
nginx:
|
|
container_name: nginx
|
|
image: nginx
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /srv/nginx/conf.d:/etc/nginx/conf.d:ro
|
|
- /srv/nginx/static.d:/etc/nginx/static.d:ro
|
|
- /srv/nginx/static:/static:ro
|
|
- /srv/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- /srv/certbot/etc:/etc/letsencrypt
|
|
- /srv/certbot/www:/var/www/certbot
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
|
networks:
|
|
- nginx
|
|
|
|
networks:
|
|
nginx:
|
|
driver: bridge
|
|
name: nginx
|
|
|