fix(deploy): Dokploy-safe compose split + resilient db healthcheck
- docker-compose.yml is now the server form: no published host ports (expose only), so a port already taken on the host can no longer stop the stack; local ports moved to docker-compose.override.yml, which Dokploy never reads - db healthcheck probes TCP 127.0.0.1 instead of the unix socket and allows start_period 30s / 12 retries while initdb finishes - api start_period 20s
This commit is contained in:
1 parent
1b6c56b47c
commit
b676889816
4 files changed
+46
-15
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# docker-compose.override.yml — เฉพาะการรันบนเครื่องตัวเอง (local preview)
|
||||
# Docker Compose merge ไฟล์นี้อัตโนมัติเมื่อรัน `docker compose up`
|
||||
# Dokploy รัน `docker compose -f docker-compose.yml` → ไฟล์นี้ไม่ถูกใช้บนเซิร์ฟเวอร์
|
||||
# → host port จึงไม่ชนกับบริการอื่นบนเซิร์ฟเวอร์ และไม่เปิดฐานข้อมูลออกภายนอก
|
||||
|
||||
services:
|
||||
web:
|
||||
ports:
|
||||
- "${WEB_HOST_PORT:-8097}:${WEB_CONTAINER_PORT:-8080}"
|
||||
|
||||
api:
|
||||
ports:
|
||||
- "${API_HOST_PORT:-8000}:${API_CONTAINER_PORT:-8000}"
|
||||
|
||||
db:
|
||||
ports:
|
||||
- "${DB_HOST_PORT:-5433}:5432"
|
||||
Reference in new issue
Block a user