Build database image with bundled bootstrap dumps

This commit is contained in:
Power BI Dev
2026-05-02 14:24:25 +07:00
parent 5f2fe70f04
commit 89ce9d30a7
4 changed files with 15 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ docker compose up -d
## Database
Dump diambil dari folder `spota_db` saat volume DB pertama kali dibuat.
Dump diambil dari folder `spota_db` yang dibundel ke image database saat volume DB pertama kali dibuat.
Database yang di-import:
@@ -56,6 +56,7 @@ Folder berikut di-mount dari host supaya data upload tidak masuk image:
Bind mount tersebut hanya aktif untuk local development melalui `docker-compose.override.yml`.
Di Coolify, compose utama memakai named volume agar tidak bentrok dengan host port/path handling Coolify.
Bootstrap database tidak lagi bergantung pada bind mount folder host ke container DB; dump dan script init dibawa oleh image database.
Opsional, upload berkas bisa dipindah ke lokasi di luar folder project dengan environment variable:
@@ -79,3 +80,4 @@ Sesuaikan environment berikut di Coolify:
Port internal app adalah `80`. Database internal memakai service name `db` pada port `3306`.
Jangan publish `8080:80` di compose utama untuk Coolify, karena Coolify akan mengurus routing sendiri dan bind host port bisa bentrok dengan resource lain.
Jangan tambahkan persistent storage ke `/docker-entrypoint-initdb.d` atau `/spota_db` pada service DB.