Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (66 loc) · 1.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (66 loc) · 1.52 KB
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
67
68
69
70
71
# Local development stack for CoLab.
# Usage: docker compose up --build
# Database will be available at localhost:5432 afterwards.
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: colab
POSTGRES_PASSWORD: colab
POSTGRES_DB: colab
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U colab -d colab"]
interval: 5s
timeout: 5s
retries: 5
http-backend:
build:
context: .
target: http-backend
restart: unless-stopped
environment:
DATABASE_URL: postgresql://colab:colab@db:5432/colab
JWT_SECRET: change-me-in-production
ALLOWED_ORIGINS: http://localhost:3000
PORT: 3001
ports:
- "3001:3001"
depends_on:
db:
condition: service_healthy
ws-backend:
build:
context: .
target: ws-backend
restart: unless-stopped
environment:
DATABASE_URL: postgresql://colab:colab@db:5432/colab
JWT_SECRET: change-me-in-production
PORT: 8080
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
colab-fe:
build:
context: .
target: frontend
args:
NEXT_PUBLIC_BACKEND_URL: http://localhost:3001
NEXT_PUBLIC_WS_URL: ws://localhost:8080
restart: unless-stopped
environment:
PORT: 3000
ports:
- "3000:3000"
depends_on:
- http-backend
- ws-backend
volumes:
pgdata: