-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
30 lines (30 loc) · 988 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
version: "3.9" # optional since v1.27.0
services:
nginx:
image: "nginx:latest"
ports:
- "${PORT:-8002}:80"
- "${PORT_HTTPS:-8445}:443"
volumes:
- ./data/log:/var/log
- ./data/log/nginx:/var/log/nginx
- ./nginx/${NGINX:-local}/:/etc/nginx/conf.d/
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
- ./.htpasswd:/etc/nginx/.htpasswd:ro
volumes_from:
- loki
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
loki:
image: grafana/loki:latest
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ./loki/loki-config.yaml:/etc/loki/local-config.yaml:ro
volumes:
logvolume01: {}