-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (96 loc) · 2.45 KB
/
docker-compose.yml
File metadata and controls
103 lines (96 loc) · 2.45 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
services:
postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: sketchkaro
POSTGRES_USER: sketchkaro_user
POSTGRES_PASSWORD: sketchkaro_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- sketchkaro-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sketchkaro_user -d sketchkaro"]
interval: 10s
timeout: 5s
retries: 5
http-backend:
build:
context: .
dockerfile: apps/http-backend/Dockerfile
image: smartcraze/sketchkaro-http-backend:latest
restart: unless-stopped
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://sketchkaro_user:sketchkaro_password@postgres:5432/sketchkaro
- JWT_SECRET=your-super-secret-jwt-key-change-in-production
- PORT=3001
ports:
- "3001:3001"
depends_on:
postgres:
condition: service_healthy
networks:
- sketchkaro-network
ws-backend:
build:
context: .
dockerfile: apps/ws-backend/Dockerfile
image: smartcraze/sketchkaro-ws-backend:latest
restart: unless-stopped
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://sketchkaro_user:sketchkaro_password@postgres:5432/sketchkaro
- JWT_SECRET=your-super-secret-jwt-key-change-in-production
- PORT=8080
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
networks:
- sketchkaro-network
web:
build:
context: .
dockerfile: apps/web/Dockerfile
restart: unless-stopped
environment:
- NODE_ENV=production
- NEXT_PUBLIC_HTTP_BACKEND=http://localhost:3001
- NEXT_PUBLIC_WS_URL=ws://localhost:8080
- PORT=3000
ports:
- "3000:3000"
depends_on:
- http-backend
- ws-backend
networks:
- sketchkaro-network
migrate:
build:
context: .
dockerfile: apps/http-backend/Dockerfile
environment:
- DATABASE_URL=postgresql://sketchkaro_user:sketchkaro_password@postgres:5432/sketchkaro
depends_on:
postgres:
condition: service_healthy
networks:
- sketchkaro-network
command: >
sh -c "
cd /app/packages/db &&
bunx prisma migrate deploy &&
bunx prisma generate
"
restart: "no"
volumes:
postgres_data:
driver: local
networks:
sketchkaro-network:
driver: bridge