-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
88 lines (85 loc) · 1.83 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
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
version: '3.8'
services:
db:
container_name: db
build:
context: .
dockerfile: ./.docker/db/Dockerfile
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USER}
POSTGRES_DB: ${DB_NAME}
volumes:
- ./.engine/data:/var/lib/postgresql/data
networks:
engine-net:
aliases:
- engine-db
ports:
- "5432:5432"
restart: on-failure
healthcheck:
test: "exit 0"
engine:
container_name: engine
build:
context: .
dockerfile: ./.docker/engine/Dockerfile
networks:
engine-net:
aliases:
- engine
ports:
- "3001:3001"
restart: on-failure
healthcheck:
test: "exit 0"
server:
image: nginx:latest
ports:
- 80:80
- 443:443
restart: always
volumes:
- ./.engine/nginx/conf/:/etc/nginx/conf.d/:ro
- certs_www_volume:/var/www/certbot/:ro
- certs_conf_volume:/etc/nginx/ssl/:ro
networks:
engine-net:
aliases:
- engine-server
server-cert:
image: nginx:latest
ports:
- 80:80
- 443:443
restart: always
volumes:
- ./.engine/nginx_cert/conf/:/etc/nginx/conf.d/:ro
- certs_www_volume:/var/www/certbot/:ro
- certs_conf_volume:/etc/nginx/ssl/:ro
networks:
engine-net:
aliases:
- engine-server-cert
certbot-renew:
image: certbot/certbot:latest
volumes:
- certs_www_volume:/var/www/certbot/:rw
- certs_conf_volume:/etc/letsencrypt/:rw
volumes:
certs_www_volume:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/.engine/certbot/www/
certs_conf_volume:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/.engine/certbot/conf/
networks:
engine-net:
name: engine-net