-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
87 lines (81 loc) · 2.31 KB
/
docker-compose.prod.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
services:
projectnext:
extends:
file: docker-compose.base.yml
service: projectnext
build:
target: prod
volumes:
- store:/usr/src/app/store
- logs:/usr/src/app/logs
deploy:
replicas: 8
db:
extends:
file: docker-compose.base.yml
service: db
restart: always
volumes:
- proddb:/var/lib/postgresql/data
prisma:
extends:
file: docker-compose.base.yml
service: prisma
build:
target: prod
volumes:
- store:/usr/src/app/prismaservice/store
- dobbelOmegaManifest:/usr/src/app/prismaservice/dobbelOmegaManifest
nginx:
extends:
file: docker-compose.base.yml
service: nginx
restart: always
ports:
- 80:80
- 443:443
environment:
DOMAIN: ${DOMAIN}
PROXY_PASS: 'projectnext:3000'
volumes:
- ./containers/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./containers/nginx/default.conf:/etc/nginx/templates/default.conf.template:ro
- store:/usr/store:ro
- ./certs/conf:/etc/letsencrypt:ro
- ./certs/www/:/var/www/certbot:ro
certbot:
image: certbot/certbot:latest
volumes:
- ./certs/www:/var/www:rw
- ./certs/conf:/etc/letsencrypt:rw
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 14d & wait $${!}; done;'"
restart: always
postfix:
build: ${PROJECT_ROOT:-.}/containers/postfix/
ports:
- '587:587'
- '25:25'
environment:
POSTGRES_HOST: 'db'
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
MY_HOSTNAME: ${MAIL_DOMAIN}
MY_DOMAIN: ${DOMAIN}
RELAY_HOST: ${MAIL_RELAY_HOST}
volumes:
- ./certs/conf:/etc/letsencrypt:ro
depends_on:
- db
links:
- db
restart: always
volumes:
proddb:
driver: local
store:
driver: local
logs:
driver: local
dobbelOmegaManifest:
driver: local