-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-grav.yml
123 lines (115 loc) · 2.78 KB
/
docker-compose-grav.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: "3"
services:
db:
image: postgres
restart: always
container_name: postgres-db
volumes:
- db:/var/lib/postgresql/data
env_file:
- db.env
networks:
- db-tier
nextcloud-fpm:
build: ./fpmcron
container_name: nextcloud-fpm
restart: always
volumes:
- nextcloud:/var/www/html
- vhost.d:/etc/nginx/vhost.d
environment:
- NEXTCLOUD_UPDATE=1
- HSTS=off
- POSTGRES_HOST=db
- VIRTUAL_HOST=nextcloud.example.com
- VIRTUAL_PROTO=fastcgi
- VIRTUAL_ROOT=/var/www/nextcloud.example.com/html
- LETSENCRYPT_HOST=nextcloud.example.com
- LETSENCRYPT_EMAIL=me@example.com
env_file:
- app.env
depends_on:
- db
networks:
- proxy-tier
- db-tier
grav:
build: ./grav
restart: always
container_name: grav
environment:
- HSTS=off
- VIRTUAL_HOST=example.com,www.example.com
- LETSENCRYPT_HOST=example.com,www.example.com
- LETSENCRYPT_EMAIL=me@example.com
volumes:
- grav:/usr/share/nginx/grav/
networks:
- proxy-tier
depends_on:
- nginx
nginx:
build: ./proxy
restart: always
container_name: nginx
environment:
- HSTS=off
ports:
- 80:80
- 443:443
volumes:
- certs:/etc/nginx/certs:ro
- conf.d:/etc/nginx/conf.d
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- nextcloud:/var/www/nextcloud.example.com/html
networks:
- proxy-tier
- default
nginx-gen:
restart: always
image: jwilder/docker-gen
container_name: nginx-gen
environment:
- HSTS=off
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
- certs:/etc/nginx/certs:ro
- conf.d:/etc/nginx/conf.d
- vhost.d:/etc/nginx/vhost.d:ro
- html:/usr/share/nginx/html
networks:
- proxy-tier
depends_on:
- nginx
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
letsencrypt-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
container_name: letsencrypt
volumes:
- certs:/etc/nginx/certs
- conf.d:/etc/nginx/conf.d
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
depends_on:
- nginx-gen
environment:
- ACME_CA_URI=https://acme-staging.api.letsencrypt.org/directory
- NGINX_PROXY_CONTAINER=nginx
- NGINX_DOCKER_GEN_CONTAINER=nginx-gen
volumes:
? db
? nextcloud
? certs
? conf.d
? vhost.d
? html
? grav
networks:
? proxy-tier
? db-tier