-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.production.yaml
67 lines (62 loc) · 1.34 KB
/
docker-compose.production.yaml
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
version: "3.3"
services:
db:
image: postgres:latest
volumes:
- db-data:/var/lib/postgresql/data
networks:
- db
environment:
POSTGRES_USER: swapr
POSTGRES_PASSWORD: changeme_prodpasswd
POSTGRES_DB: swapr_prod
backend:
image: gatechswapr/backend:latest
user: "node"
configs:
- source: backend_config
target: /data/app/config/config.json
volumes:
- /data/node_modules
working_dir: /data/app
depends_on:
- db
networks:
- backend
- db
environment:
PORT: 8001
NODE_ENV: production
DB_USERNAME: swapr
DB_PASSWORD: changeme_prodpasswd
DB_NAME: swapr_prod
www:
image: gatechswapr/www:latest
depends_on:
- backend
networks:
- backend
ports:
- 80:80
- 443:443
configs:
- source: nginx_config
target: /etc/nginx/conf.d/vhost.conf
- source: nginx_ssl_cert
target: /etc/nginx/ssl/ssl.prod.cert
- source: nginx_ssl_key
target: /etc/nginx/ssl/ssl.prod.key
networks:
backend:
db:
volumes:
db-data:
configs:
nginx_config:
file: ./config/www/nginx.prod.conf
nginx_ssl_cert:
file: ./config/www/ssl/ssl.dev.cert
nginx_ssl_key:
file: ./config/www/ssl/ssl.dev.key
backend_config:
file: ./config/backend/config.prod.json