Convert landing-page and database services to custom Dockerfile builds to avoid host volume mounting errors

This commit is contained in:
ilham_gmail
2026-06-12 14:08:00 +07:00
parent a907d9ced2
commit 4fa2cd162c
3 changed files with 19 additions and 6 deletions
+6 -6
View File
@@ -1,10 +1,9 @@
services:
# 1. Reverse Proxy & Landing Page
landing-page:
image: nginx:alpine
volumes:
- ./landing-page:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
build:
context: .
dockerfile: landing-page.Dockerfile
depends_on:
- poverty-mapping
- tugas-spbu
@@ -57,7 +56,9 @@ services:
# 4. Database MySQL
db:
image: mysql:8.0
build:
context: .
dockerfile: db.Dockerfile
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD:-root_password}
@@ -66,7 +67,6 @@ services:
- MYSQL_PASSWORD=${DB_PASSWORD:-webgis_password}
volumes:
- mysql_data:/var/lib/mysql
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
restart: always
volumes: