fix(deploy): PORT ชนกับ env ของ Dokploy → ใช้ APP_PORT + บันทึกเคส deploy Error 0s
- docker-compose: substitution ใช้ ${APP_PORT:-30004} แล้วส่งเข้า env PORT ของ container
เพราะ Dokploy รัน `docker compose` จากโปรเซสที่ตัวเองมี PORT=3000
→ shell env ชนะ .env ทำให้ nginx ฟัง 3000 แต่ Traefik ชี้ 30004 = 503 ทั้งเว็บ
- docker-compose.override.yml: ใช้ APP_PORT ตามกัน
- docs/deploy-dokploy.md: 2 สาเหตุจริงที่เจอบน production
1) ช่อง Command ของ compose app ค้าง `docker rm -f <id>` → Dokploy ต่อเป็น `docker docker ...`
→ unknown shorthand flag: 'f' in -f → deployment Error ใช้เวลา 0s
แก้โดยล้าง command = '' (บันทึกคำสั่ง SQL ไว้)
2) PORT=3000 จาก container ของ Dokploy ทับ .env → 503, healthcheck ผ่านแต่ Traefik DOWN
This commit is contained in:
1 parent
6cdfbae561
commit
0f5e587c77
3 files changed
+49
-8
No files matched your search
@@ -5,4 +5,4 @@
|
||||
services:
|
||||
web:
|
||||
ports:
|
||||
- "127.0.0.1:${HOST_PORT:-30004}:${PORT:-30004}"
|
||||
- "127.0.0.1:${HOST_PORT:-30004}:${APP_PORT:-30004}"
|
||||
Reference in new issue
Block a user