-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
98 lines (93 loc) · 3.47 KB
/
docker-compose.yaml
File metadata and controls
98 lines (93 loc) · 3.47 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
name: tsu-stack
services:
server:
container_name: tsu-stack-server
build:
context: .
dockerfile: apps/server/Dockerfile
args:
- "SOURCE_COMMIT=${SOURCE_COMMIT}"
- "VITE_SERVER_URL=${VITE_SERVER_URL:-http://localhost:5000}"
- "VITE_WEB_URL=${VITE_WEB_URL:-http://localhost:3000}"
- "DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-tsu-stack}"
- "BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-replace_me_run_pnpm_auth_secret_to_generate_a_real_value_here}"
ports:
- "${SERVER_PORT:-5000}:5000"
environment:
- "VITE_SERVER_URL=${VITE_SERVER_URL:-http://localhost:5000}"
- "VITE_WEB_URL=${VITE_WEB_URL:-http://localhost:3000}"
- "DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-tsu-stack}"
- "BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-replace_me_run_pnpm_auth_secret_to_generate_a_real_value_here}"
- "ENABLE_OPEN_API_DOCS=${ENABLE_OPEN_API_DOCS:-false}"
healthcheck:
test:
[
"CMD-SHELL",
"wget -qO- http://127.0.0.1:5000$(echo $VITE_SERVER_URL | sed 's|^http[s]*://[^/]*||' | sed 's|/$||')/health/live || exit 1",
]
interval: 10s
timeout: 3s
retries: 5
networks:
- tsu-stack-network
depends_on:
postgres:
condition: service_healthy
web:
container_name: tsu-stack-web
build:
context: .
dockerfile: apps/web/Dockerfile
args:
- "SOURCE_COMMIT=${SOURCE_COMMIT}"
- "VITE_SERVER_URL=${VITE_SERVER_URL:-http://localhost:5000}"
- "VITE_WEB_URL=${VITE_WEB_URL:-http://localhost:3000}"
- "VITE_IMGPROXY_URL=${VITE_IMGPROXY_URL:-}"
- "DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-tsu-stack}"
- "BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-replace_me_run_pnpm_auth_secret_to_generate_a_real_value_here}"
environment:
- "VITE_SERVER_URL=${VITE_SERVER_URL:-http://localhost:5000}"
- "VITE_WEB_URL=${VITE_WEB_URL:-http://localhost:3000}"
- "VITE_IMGPROXY_URL=${VITE_IMGPROXY_URL:-}"
- "DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-tsu-stack}"
- "BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-replace_me_run_pnpm_auth_secret_to_generate_a_real_value_here}"
ports:
- "${WEB_PORT:-3000}:3000"
healthcheck:
test:
[
"CMD-SHELL",
"wget -qO- http://127.0.0.1:3000$(echo $VITE_WEB_URL | sed 's|^http[s]*://[^/]*||' | sed 's|/$||')/_api/health/live || exit 1",
]
interval: 10s
timeout: 3s
retries: 5
networks:
- tsu-stack-network
depends_on:
server:
condition: service_healthy
postgres:
image: postgres:18-alpine
container_name: tsu-stack-postgres
ports:
- "${POSTGRES_PORT:-5432}:5432"
environment:
- "POSTGRES_USER=${POSTGRES_USER:-postgres}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}"
- "POSTGRES_DB=${POSTGRES_DB:-tsu-stack}"
volumes:
- tsu-stack-pg-data:/var/lib/postgresql
networks:
- tsu-stack-network
healthcheck:
test:
- CMD-SHELL
- "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"
interval: 5s
timeout: 20s
retries: 10
volumes:
tsu-stack-pg-data:
networks:
tsu-stack-network: