-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (40 loc) · 950 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (40 loc) · 950 Bytes
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.9"
services:
postgres:
image: postgres:16
container_name: collab-postgres
env_file:
- .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d collab_db"]
interval: 5s
timeout: 5s
retries: 10
backend:
build:
context: .
dockerfile: Dockerfile
container_name: collab-backend
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
ports:
- "4000:4000"
command: sh -c "npx prisma generate && npx prisma db push && npm run start:dev"
volumes:
- .:/app
- /app/node_modules
restart: unless-stopped
volumes:
postgres_data: