feat: guna MySQL external — host.docker.internal (dev) & 172.17.200.16 (prod)

- Buang service db dan volume dbdata dari compose files
- dev: extra_hosts host.docker.internal:host-gateway → capai MySQL Windows host
- prod: IP terus 172.17.200.16, tiada extra_hosts diperlukan
- .env.docker: DB_HOST=host.docker.internal dengan nota untuk production
- entrypoint.sh: default DB_HOST → host.docker.internal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Saufi
2026-05-18 16:34:17 +08:00
parent 576c71c960
commit 69c91dfb4b
4 changed files with 23 additions and 63 deletions

View File

@@ -28,7 +28,9 @@ LOG_LEVEL=debug
# ── Database ──────────────────────────────────────────────────────────────────
DB_CONNECTION=mysql
DB_HOST=db # nama service dalam docker-compose.yml
# DEV (Windows): DB_HOST=host.docker.internal ← MySQL pada host Windows
# PRODUCTION: DB_HOST=172.17.200.16 ← MySQL server external
DB_HOST=host.docker.internal
DB_PORT=3306
DB_DATABASE=ecert_mbip
DB_USERNAME=ecert