forked from RENCI/ctmd-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
56 lines (52 loc) · 1.22 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
version: '3'
services:
db:
container_name: postgres
restart: always
build:
context: ./db/
dockerfile: Dockerfile
volumes:
- ./db/pgdata/:/var/lib/postgresql/data/
- ./db/init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh
- ./db/duketic.sql:/data/duketic.sql
env_file:
- ./.env
expose:
- ${POSTGRES_PORT}
api:
container_name: node
build:
context: ./api/
dockerfile: Dockerfile
volumes:
- ./api:/usr/src/app
- /usr/src/app/node_modules/
ports:
- ${API_PORT}:${API_PORT}
environment:
- NODE_ENV=production
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
env_file:
- ./.env
depends_on:
- db
frontend:
container_name: react
build:
context: ./frontend/
dockerfile: Dockerfile-prod
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
- ./frontend/nginx.conf:/etc/nginx/conf.d/default.conf
- ./frontend/.htpasswd:/etc/nginx/.htpasswd
environment:
- NODE_ENV=production
ports:
- 80:80
depends_on:
- api