168 lines
5.8 KiB
YAML
168 lines
5.8 KiB
YAML
# =============================================================================
|
|
# DIDI Platform - Data Layer Services
|
|
# =============================================================================
|
|
# PostgreSQL, RabbitMQ, MinIO, Redis Commander, PgAdmin
|
|
# Admin UIs bound to 127.0.0.1 (VPN access only)
|
|
# =============================================================================
|
|
|
|
name: didi-data-layer
|
|
|
|
services:
|
|
# ===========================================================================
|
|
# PostgreSQL - Local Staging Database
|
|
# ===========================================================================
|
|
staging-dataLayer-postgres:
|
|
image: postgres:15-alpine
|
|
container_name: staging-dataLayer-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: misinformation_db
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres123
|
|
PGDATA: /var/lib/postgresql/data/pgdata
|
|
volumes:
|
|
- didi-staging-postgres-data:/var/lib/postgresql/data
|
|
- didi-staging-postgres-backups:/backups
|
|
# No ports exposed - accessible only within Docker network on port 5432
|
|
networks:
|
|
- didi-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d misinformation_db"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
# ===========================================================================
|
|
# RabbitMQ - Message Queue
|
|
# ===========================================================================
|
|
staging-dataLayer-rabbitmq:
|
|
image: rabbitmq:3.12.6-management-alpine
|
|
container_name: staging-dataLayer-rabbitmq
|
|
restart: unless-stopped
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: admin
|
|
RABBITMQ_DEFAULT_PASS: rabbitmq123
|
|
RABBITMQ_DEFAULT_VHOST: /
|
|
volumes:
|
|
- didi-staging-rabbitmq-data:/var/lib/rabbitmq
|
|
ports:
|
|
- "15672:15672" # RabbitMQ Management UI
|
|
- "127.0.0.1:5672:5672" # AMQP - localhost only
|
|
networks:
|
|
- didi-network
|
|
healthcheck:
|
|
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
|
|
# ===========================================================================
|
|
# MinIO - Object Storage
|
|
# ===========================================================================
|
|
staging-dataLayer-minio:
|
|
image: minio/minio:RELEASE.2024-08-29T01-40-52Z
|
|
container_name: staging-dataLayer-minio
|
|
restart: unless-stopped
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minio123
|
|
MINIO_REGION_NAME: us-east-1
|
|
MINIO_BROWSER: "on"
|
|
ports:
|
|
- "9001:9001" # MinIO Console UI
|
|
- "9000:9000"
|
|
volumes:
|
|
- didi-staging-minio-data:/data
|
|
networks:
|
|
- didi-network
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
# ===========================================================================
|
|
# PgAdmin - Database Administration
|
|
# ===========================================================================
|
|
staging-dataLayer-pgadmin:
|
|
image: dpage/pgadmin4:latest
|
|
container_name: staging-dataLayer-pgadmin
|
|
restart: unless-stopped
|
|
environment:
|
|
PGADMIN_DEFAULT_EMAIL: admin@example.com
|
|
PGADMIN_DEFAULT_PASSWORD: admin123
|
|
PGADMIN_CONFIG_SERVER_MODE: "False"
|
|
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
|
|
volumes:
|
|
- didi-staging-pgadmin-data:/var/lib/pgadmin
|
|
- ./pgadmin/servers.json:/pgadmin4/servers.json:ro
|
|
- ./pgadmin/pgpass:/pgadmin4/pgpass:ro
|
|
ports:
|
|
- "5050:80" # pgAdmin UI
|
|
networks:
|
|
- didi-network
|
|
|
|
# ===========================================================================
|
|
# Redis Commander - Redis Administration
|
|
# ===========================================================================
|
|
staging-dataLayer-redis-commander:
|
|
image: rediscommander/redis-commander:latest
|
|
container_name: staging-dataLayer-redis-commander
|
|
restart: unless-stopped
|
|
environment:
|
|
REDIS_HOSTS: "production:didi-cache:6379:0:redis123"
|
|
URL_PREFIX: /redis-commander
|
|
# No external ports - access via Kong
|
|
networks:
|
|
- didi-network
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8081/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
# ===========================================================================
|
|
# Admin Dashboard - Infrastructure Monitoring (HTTPS)
|
|
# ===========================================================================
|
|
didi-admin:
|
|
image: didi-admin:latest
|
|
container_name: didi-admin
|
|
restart: unless-stopped
|
|
environment:
|
|
NODE_ENV: production
|
|
REACT_APP_STAGING_MODE: "false"
|
|
REACT_APP_HOST: "10.11.10.12"
|
|
REACT_APP_FRAMEWORK_API_URL: "http://didi-framework:3005"
|
|
REACT_APP_API_BASE_URL: "https://didi365.eu"
|
|
REACT_APP_KEYCLOAK_URL: "https://didi365.eu/auth"
|
|
REACT_APP_KEYCLOAK_REALM: "didi-admins"
|
|
REACT_APP_KEYCLOAK_CLIENT_ID: "admin-dashboard"
|
|
ports:
|
|
- "3000:443"
|
|
networks:
|
|
- didi-network # unified — all DIDI + AI platform on this single network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-k", "-f", "-s", "https://127.0.0.1:443/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
networks:
|
|
didi-network:
|
|
external: true # single shared network for all DIDI + AI platform stacks
|
|
|
|
volumes:
|
|
didi-staging-postgres-data:
|
|
external: true
|
|
didi-staging-postgres-backups:
|
|
name: didi-staging-postgres-backups
|
|
didi-staging-rabbitmq-data:
|
|
name: didi-staging-rabbitmq-data
|
|
didi-staging-minio-data:
|
|
external: true
|
|
didi-staging-pgadmin-data:
|
|
external: true
|