-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
64 lines (57 loc) · 1.1 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
version: '3.3'
services:
graphql-dev:
build:
dockerfile: Dockerfile
context: .
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
ports:
- "${DEV_PORT}:3000"
depends_on:
- postgres
environment:
NODE_ENV: "development"
networks:
- main-network
env_file:
- api/.env
command: sh -c "yarn --cwd api dev"
graphql-prod:
build:
dockerfile: Dockerfile
context: .
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
environment:
NODE_ENV: "production"
ports:
- "${PROD_PORT}:4000"
networks:
- main-network
depends_on:
- postgres
env_file:
- api/.env
command: sh -c "yarn --cwd api prod"
postgres:
image: postgres:13
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "${DB_PORT}:5432"
volumes:
- db:/var/lib/postgresql/data
networks:
- main-network
env_file:
- api/.env
volumes:
db:
driver: local
networks:
main-network: