-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
66 lines (62 loc) · 1.29 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
65
66
version: "3.8"
services:
db:
image: "postgres:15.3-bookworm"
env_file:
- .env.prod
ports:
- "${PGPORT}:${PGPORT}"
healthcheck:
test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB}"]
interval: 10s
timeout: 30s
retries: 3
volumes:
- ./data_rideshare:/var/lib/postgresql/data
profiles:
- "prod"
db-dev:
image: "postgres:15.3-bookworm"
env_file:
- .env.dev
ports:
- "${PGPORT}:${PGPORT}"
healthcheck:
test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB}"]
interval: 10s
timeout: 30s
retries: 3
volumes:
- ./data_rideshare:/var/lib/postgresql/data
profiles:
- "dev"
backend:
build:
context: .
dockerfile: ./docker/Dockerfile.prod
env_file:
- .env.prod
depends_on:
db:
condition: service_healthy
ports:
- "${PORT}:${PORT}"
profiles:
- "prod"
backend-dev:
build:
context: .
dockerfile: ./docker/Dockerfile.dev
env_file:
- .env.dev
depends_on:
db-dev:
condition: service_healthy
volumes:
- ./src:/usr/src/app/src
- ./config:/usr/src/app/config
- ./tsconfig.json:/usr/src/app/tsconfig.json
ports:
- "${PORT}:${PORT}"
profiles:
- "dev"