-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
52 lines (49 loc) · 1.11 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
services:
postgres:
container_name: hias-db
image: postgres:latest
environment:
POSTGRES_USER: hias-user
POSTGRES_PASSWORD: 123456
POSTGRES_DB: hias
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
api:
container_name: hias-api
build:
context: .
dockerfile: Dockerfile.api
environment:
- DATABASE_URL=postgresql://hias-user:123456@postgres:5432/hias?schema=public
- PORT=5000
- NODE_ENV=development
ports:
- "5000:5000"
volumes:
- ./api:/app/api
- ./prisma:/app/prisma
- /app/api/node_modules
depends_on:
- postgres
command: sh -c "cd /app/api && npm run dev"
app:
container_name: hias-app
build:
context: .
dockerfile: Dockerfile.app
ports:
- "3000:3000"
volumes:
- ./app:/app/app
- /app/app/node_modules
depends_on:
- api
environment:
- NODE_ENV=development
- PORT=3000
- REACT_APP_API_URL=http://localhost:5000
command: sh -c "cd /app/app && npm start"
volumes:
postgres_data: