forked from Devops-ohtuprojekti/DevOpsCSAOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (43 loc) · 905 Bytes
/
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
version: '3.8'
services:
db:
image: postgres:13-alpine
tty: true
environment:
POSTGRES_USER: testUser
POSTGRES_PASSWORD: password
POSTGRES_DB: dev_db
command: ["postgres", "-c", "log_statement=all"]
volumes:
- dbdata:/var/lib/postgresql/data:Z
ports:
- 5400:5432
backend:
build:
context: ./backend
command: ./wait-for db:5432 -- npm run dev
tty: true
environment:
PORT: 5000
DB_HOST: db
DB_USER: testUser
DB_PASS: password
volumes:
- ./backend/src/:/home/node/app/src/:Z
ports:
- 5000:5000
depends_on:
- db
frontend:
build:
context: ./frontend
tty: true
environment:
API_URL: http://localhost:5000/api
NODE_ENV: development
volumes:
- ./frontend/src/:/usr/src/app/src/:Z
ports:
- 3000:3000
volumes:
dbdata: