forked from RENCI/ctmd-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (50 loc) · 1.12 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
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=development
- 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
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
environment:
- NODE_ENV=development
ports:
- 3000:3000
depends_on:
- api