-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
85 lines (79 loc) · 1.69 KB
/
docker-compose.yaml
File metadata and controls
85 lines (79 loc) · 1.69 KB
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
version: '3'
services:
db:
image: postgres
env_file:
- config/secrets.env
volumes:
- database_volume:/var/lib/postgresql/data/
networks:
- db_network
web:
build: .
env_file:
- config/secrets.env
volumes:
- static_volume:/bf2-www/static/
- media_volume:/bf2-www/media/
networks:
- nginx_network
- db_network
depends_on:
- db
nginx:
image: nginx
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./config/nginx/templates:/etc/nginx/templates
- static_volume:/bf2-www/static/
- media_volume:/bf2-www/media/
- web_root:/var/www/html/
- certbot_var:/var/lib/letsencrypt/
- certbot_etc:/etc/letsencrypt/
- dhparam:/etc/ssl/certs/
- nginx_logs:/var/log/nginx/
networks:
- nginx_network
depends_on:
- web
env_file:
- .env
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- certbot_etc:/etc/letsencrypt
- certbot_var:/var/lib/letsencrypt
- web_root:/var/www/html
networks:
- nginx_network
depends_on:
- nginx
command: certonly --webroot --webroot-path=/var/www/html --email webmaster@bfrisbee2s.nl --agree-tos --no-eff-email --force-renewal -d ${DOMAIN}
networks:
nginx_network:
driver: bridge
db_network:
driver: bridge
volumes:
database_volume:
static_volume:
media_volume:
certbot_etc:
certbot_var:
web_root:
dhparam:
driver: local
driver_opts:
type: none
device: ${PWD}/dhparam/
o: bind
nginx_logs:
driver: local
driver_opts:
type: none
device: ${PWD}/log/nginx/
o: bind