Initial commit of unified WebGIS projects
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# 1. Reverse Proxy & Landing Page
|
||||
landing-page:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./landing-page:/usr/share/nginx/html:ro
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
depends_on:
|
||||
- poverty-mapping
|
||||
- tugas-spbu
|
||||
restart: always
|
||||
|
||||
# 2. Poverty Mapping Application
|
||||
poverty-mapping:
|
||||
build:
|
||||
context: ./poverty-mapping
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- DB_HOST=db
|
||||
- DB_PORT=3306
|
||||
- DB_USER=webgis_user
|
||||
- DB_PASS=${DB_PASSWORD:-webgis_password}
|
||||
- DB_NAME=poverty_db
|
||||
- API_KEY=${POVERTY_API_KEY:-8f3b7e6a9c4d2f1a6b8c9d0e4f7a1b2c}
|
||||
- JWT_SECRET=${JWT_SECRET:-jwt_secret_dev_key_12345}
|
||||
- INTERNAL_AUTH_KEY=${INTERNAL_AUTH_KEY:-internal_dev_key}
|
||||
- BASIC_API_USER=webgis-api
|
||||
- BASIC_API_PASS=${BASIC_API_PASS:-api_pass}
|
||||
- SMTP_HOST=smtp.gmail.com
|
||||
- SMTP_PORT=587
|
||||
- SMTP_USER=${SMTP_USER:-dev@example.com}
|
||||
- SMTP_PASS=${SMTP_PASS:-dev_pass}
|
||||
- SMTP_ENCRYPTION=tls
|
||||
- MAIL_FROM=${SMTP_USER:-dev@example.com}
|
||||
- MAIL_FROM_NAME=PovertyMapping
|
||||
volumes:
|
||||
- poverty_uploads:/var/www/html/uploads
|
||||
depends_on:
|
||||
- db
|
||||
restart: always
|
||||
|
||||
# 3. Tugas SPBU Application
|
||||
tugas-spbu:
|
||||
build:
|
||||
context: ./tugas-spbu
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- DB_HOST=db
|
||||
- DB_PORT=3306
|
||||
- DB_USER=webgis_user
|
||||
- DB_PASS=${DB_PASSWORD:-webgis_password}
|
||||
- DB_NAME=spbu_db
|
||||
- API_KEY=${SPBU_API_KEY:-8f3b7e6a9c4d2f1a6b8c9d0e4f7a1b2c}
|
||||
depends_on:
|
||||
- db
|
||||
restart: always
|
||||
|
||||
# 4. Database MySQL
|
||||
db:
|
||||
image: mysql:8.0
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD:-root_password}
|
||||
- MYSQL_DATABASE=poverty_db
|
||||
- MYSQL_USER=webgis_user
|
||||
- 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:
|
||||
mysql_data:
|
||||
poverty_uploads:
|
||||
Reference in New Issue
Block a user