diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..3a6cb09 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +DB_ROOT_PASSWORD=change_this_password diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1ae8cc1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,31 @@ +services: + app: + build: + context: . + dockerfile: Dockerfile + depends_on: + - database + environment: + DB_HOST: database + DB_USER: root + DB_PASSWORD: ${DB_ROOT_PASSWORD:-rootpassword} + DB_CHAR: utf8mb4 + SPBU_DB_NAME: db_spbu + WEBGIS02_DB_NAME: webgis_db + WEBGIS_V3_DB_NAME: webgis_kemiskinan + expose: + - "80" + restart: unless-stopped + + database: + image: mariadb:10.11 + environment: + MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-rootpassword} + volumes: + - database_data:/var/lib/mysql + - ./setup_databases.sql:/docker-entrypoint-initdb.d/01-combine-webgis.sql:ro + - ./webgis-v3/sql/schema.sql:/docker-entrypoint-initdb.d/02-webgis-v3.sql:ro + restart: unless-stopped + +volumes: + database_data: diff --git a/webgis-v3/config/database.php b/webgis-v3/config/database.php index 41e99f0..62f7581 100644 --- a/webgis-v3/config/database.php +++ b/webgis-v3/config/database.php @@ -1,8 +1,8 @@