Build database image with bundled bootstrap dumps
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user