diff --git a/.dockerignore b/.dockerignore index 3ef8c2f..cd3a0e9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,7 @@ .gitignore .codex .agents +.env *.rar *.zip *.7z 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..ea63179 --- /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_NAME: webgis_kemiskinan + SPBU_DB_NAME: db_spbu + WEBGIS02_DB_NAME: webgis_db + DB_CHAR: utf8mb4 + 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: