forked from nginx-proxy/acme-companion
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose-testing.yml
71 lines (66 loc) · 1.9 KB
/
docker-compose-testing.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: "3.5"
services:
testing_reverse_proxy:
image: pinidh/nginx-proxy:latest
container_name: testing_reverse_proxy
restart: always
# Just exposing because we stand behind the main reverse proxy
expose:
- "80"
- "443"
volumes:
- vhost:/etc/nginx/vhost.d:ro
- html:/usr/share/nginx/html
- dhparam:/etc/nginx/dhparam
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
labels:
- testing_reverse_proxy.nginx_proxy=true
environment:
# vhost variables
- VIRTUAL_HOST=*.testing.example.com
- VIRTUAL_PORT=80
- HTTPS_METHOD=passthrough
# nginx-proxy variables
- HOST_VARIABLE_NAME=TESTING_VIRTUAL_HOST
- HTTPS_PROXY_PROTOCOL=true
# Replace with the result of the following command:
# docker inspect reverse-proxy_bridge | jq -r '.[0].IPAM.Config[0].Subnet'
- REAL_IP_FROM=172.19.0.0/16
networks:
reverse-proxy_bridge:
testing_letsencrypt:
image: pinidh/letsencrypt-nginx-proxy-companion:latest
container_name: testing_letsencrypt
restart: always
volumes:
- acme:/etc/acme.sh
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
reverse-proxy_bridge:
environment:
- NGINX_PROXY_CONTAINER_LABEL=testing_reverse_proxy.nginx_proxy
- HOST_VARIABLE_NAME=TESTING_LETSENCRYPT_HOST
testing_hello_world:
image: dockerbogo/docker-nginx-hello-world:latest
container_name: testing_hello_world
restart: always
environment:
- TESTING_VIRTUAL_HOST=hello.testing.example.com
- HTTPS_METHOD=noredirect
- TESTING_LETSENCRYPT_HOST=hello.testing.example.com
- LETSENCRYPT_TEST=true
networks:
reverse-proxy_bridge:
volumes:
vhost:
acme:
certs:
dhparam:
html:
networks:
reverse-proxy_bridge:
external: true