-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (54 loc) · 1.26 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
version: "3"
services:
db:
image: postgres
restart: always
env_file:
- ./.env
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PORT=${POSTGRES_PORT}
volumes:
- db-data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
frontend:
build:
context: ../frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
depends_on:
- backend
backend:
restart: always
build:
context: .
dockerfile: Dockerfile.dev
env_file:
- .env
environment:
- NODE_ENV=development
- DB_HOST=db
- HOST=0.0.0.0
- POSTGRES_PORT=${POSTGRES_PORT}
- DB_USER=${POSTGRES_USER}
- DB_PASSWORD=${POSTGRES_PASSWORD}
- DB_NAME=${POSTGRES_DB}
- PORT=${PORT_DEV}
- JWT_SECRET=${JWT_SECRET}
- JWT_EXPIRES_IN=${JWT_EXPIRES_IN}
- REFRESH_TOKEN_SECRET=${REFRESH_TOKEN_SECRET}
- REFRESH_TOKEN_EXPIRES_IN=${REFRESH_TOKEN_EXPIRES_IN}
- CHOKIDAR_USEPOLLING=true
ports:
- "${PORT_DEV}:${PORT_DEV}"
depends_on:
- db
volumes:
- "./src:/app/src"
command: sh -c "npm run start:watch"
volumes:
db-data: