-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
93 lines (88 loc) · 2.44 KB
/
Copy pathcompose.yml
File metadata and controls
93 lines (88 loc) · 2.44 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
services:
deps:
build:
context: .
target: dev
command: bun install --frozen-lockfile
volumes:
- .:/app
- node_modules:/app/node_modules
- bun_cache:/root/.bun/install/cache
server:
build:
context: .
target: dev
command: bun run dev:server
environment:
HOST: 0.0.0.0
PORT: 3000
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-tilezo}
AUTH_SECRET: tilezo-development-secret
NODE_ENV: development
ports:
- "${SERVER_PORT:-3000}:3000"
volumes:
- .:/app
- node_modules:/app/node_modules
- bun_cache:/root/.bun/install/cache
depends_on:
deps:
condition: service_completed_successfully
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
client:
build:
context: .
target: dev
command: bun run dev:client
environment:
PUBLIC_API_URL: http://localhost:${SERVER_PORT:-3000}
PUBLIC_WS_URL: ws://localhost:${SERVER_PORT:-3000}/ws
ports:
- "${CLIENT_PORT:-3001}:3001"
volumes:
- .:/app
- node_modules:/app/node_modules
- bun_cache:/root/.bun/install/cache
depends_on:
deps:
condition: service_completed_successfully
server:
condition: service_started
db:
image: postgres:17-alpine@sha256:979c4379dd698aba0b890599a6104e082035f98ef31d9b9291ec22f2b13059ca
environment:
POSTGRES_DB: ${POSTGRES_DB:-tilezo}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
ports:
- "127.0.0.1:${DB_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-tilezo}"]
interval: 5s
timeout: 5s
retries: 10
migrate:
build:
context: .
target: dev
command: bun run --cwd apps/server db:migrate
environment:
DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-tilezo}
volumes:
- .:/app
- node_modules:/app/node_modules
- bun_cache:/root/.bun/install/cache
depends_on:
deps:
condition: service_completed_successfully
db:
condition: service_healthy
volumes:
bun_cache:
node_modules:
postgres_data: