-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (52 loc) · 1.46 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# https://github.com/nginx-proxy/nginx-proxy
# https://github.com/nginx-proxy/acme-companion
# https://github.com/nginx-proxy/acme-companion/blob/main/docs/Docker-Compose.md
# https://linuxhandbook.com/nginx-reverse-proxy-docker/
# make sure to enable full SSL on cloudflare / whatever
services:
nginx-proxy:
image: nginxproxy/nginx-proxy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- "nginx_proxy_net"
logging:
driver: loki
options:
loki-url: ${LOKI_URL}
acme-companion:
image: nginxproxy/acme-companion
restart: unless-stopped
networks:
- "nginx_proxy_net"
volumes_from:
- nginx-proxy
volumes:
- certs:/etc/nginx/certs:rw
- acme:/etc/acme.sh
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- nginx-proxy
environment:
logging:
driver: loki
options:
loki-url: ${LOKI_URL}
volumes:
conf:
certs:
vhost:
html:
acme:
networks:
nginx_proxy_net:
external: true