build(compose): split Dokploy base from local preview, drop host port from base

Base docker-compose.yml now matches Dokploy's model: expose only (no published host
port), no fixed container_name, named volume hobbypj-data, traefik.docker.network
label. Local port mapping + ./data bind moved to docker-compose.override.yml with
'volumes: !override' (otherwise compose appends two mounts on /app/data and SQLite
fails with 'disk I/O error').

Verified locally: override mode serves on PORT env (8113) from ./data; base mode
(named volume, no host port) answers inside the container on 8090 and seeds 6 rows.

README: Dokploy deploy steps (service hobbypj-contents, container port = PORT,
domain www.hobbypj.com) + note not to run the dev server and the container on the
same ./data.
This commit is contained in:
Bkk1234 committed 2026-11-23 01:08:08 +07:00
1 parent 772da6fc39
commit 94c253d4e3
5 files changed
+58 -9

No files matched your search

+1 -2
View File
@@ -16,5 +16,4 @@ PUBLISH_PUSH=0
# ที่อยู่ไฟล์ฐานข้อมูล SQLite (เทียบกับ root ของโปรเจค) — เว้นว่าง = data/hobbypj.sqlite
DB_PATH=data/hobbypj.sqlite
# ชื่อ container
CONTAINER_NAME=hobbypj-contents
# (ไม่มี CONTAINER_NAME แล้ว — ปล่อยให้ compose ตั้งชื่อเอง กันชนกับ stack อื่นบน server)