-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
64 lines (60 loc) · 1.18 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
63
64
version: '3.7'
services:
server:
build:
context: ./server
dockerfile: Dockerfile
image: app-server
container_name: app-backend
command: npm run dev
volumes:
- ./server/:/server
- /server/node_modules
ports:
- "5000:5000"
depends_on:
- db
env_file: ./server/.env
environment:
# - NODE_ENV=development
DATABASE_URL: postgres://postgres:123456@db:5432/login_matcha
networks:
- default
client:
build:
context: ./client
dockerfile: Dockerfile
image: app-client
container_name: app-frontend
command: npm start
volumes:
- ./client/:/client
- /client/node_modules
depends_on:
- server
ports:
- "3000:3000"
networks:
- default
db:
image: postgres:10.4
build:
context: ./db
dockerfile: Dockerfile
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "123456"
POSTGRES_DB: "login_matcha"
volumes:
- data-volume:/data/db
ports:
- "5433:5432"
networks:
- default
networks:
app-default:
volumes:
data-volume:
node_modules:
web-root:
driver: local