-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
54 lines (51 loc) · 1.24 KB
/
docker-compose.dev.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
version: "3.9"
services:
postgres:
image: postgres:14.5
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 5s
timeout: 5s
retries: 50
backend:
build:
context: ./backend
args:
- mode=dev
environment:
- NODE_ENV=development
ports:
- 8000:8000
volumes:
- ./backend/node_modules:/backend/node_modules
- ./backend/package.json:/backend/package.json
- ./backend/tsconfig.json:/backend/tsconfig.json
- ./backend/src:/backend/src
- ./backend/index.ts:/backend/index.ts
command: sh -c "npx mikro-orm schema:update -r && npx mikro-orm migration:up && npx nodemon ./index.ts"
frontend:
build:
context: ./frontend
args:
- mode=dev
dockerfile: Dockerfile.dev
ports:
- 3000:3000
volumes:
- ./frontend:/frontend
- /frontend/node_modules
command: sh -c "npm start"
nginx:
build:
context: ./nginx
ports:
- 80:8080
depends_on:
- backend
- frontend