mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
111 lines
3.0 KiB
YAML
111 lines
3.0 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
# MetaBuilder Next.js App
|
|
nextjs-app:
|
|
image: ghcr.io/${GITHUB_REPOSITORY:-johndoe6345789/metabuilder}/nextjs-app:${IMAGE_TAG:-latest}
|
|
container_name: metabuilder-nextjs
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DATABASE_URL=file:/app/data/metabuilder.db
|
|
- DBAL_API_URL=http://dbal-daemon:8080
|
|
- DBAL_WS_URL=ws://dbal-daemon:50051
|
|
- NEXTAUTH_URL=http://localhost:3000
|
|
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-change-me-in-production}
|
|
volumes:
|
|
- metabuilder-data:/app/data
|
|
depends_on:
|
|
- dbal-daemon
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 40s
|
|
networks:
|
|
- metabuilder-network
|
|
|
|
# DBAL Daemon (Production)
|
|
dbal-daemon:
|
|
image: ghcr.io/${GITHUB_REPOSITORY:-johndoe6345789/metabuilder}/dbal-daemon:${IMAGE_TAG:-latest}
|
|
container_name: metabuilder-dbal
|
|
ports:
|
|
- "8080:8080"
|
|
- "50051:50051"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DATABASE_URL=file:/app/data/metabuilder.db
|
|
- LOG_LEVEL=info
|
|
- ENABLE_METRICS=true
|
|
volumes:
|
|
- metabuilder-data:/app/data
|
|
- dbal-logs:/app/logs
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
networks:
|
|
- metabuilder-network
|
|
|
|
# Prometheus for metrics (optional)
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: metabuilder-prometheus
|
|
ports:
|
|
- "9090:9090"
|
|
volumes:
|
|
- ./deployment/docker/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- prometheus-data:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
|
- '--web.console.templates=/usr/share/prometheus/consoles'
|
|
restart: unless-stopped
|
|
networks:
|
|
- metabuilder-network
|
|
profiles:
|
|
- monitoring
|
|
|
|
# Grafana for visualization (optional)
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: metabuilder-grafana
|
|
ports:
|
|
- "3001:3000"
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=admin
|
|
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
|
|
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource
|
|
volumes:
|
|
- grafana-data:/var/lib/grafana
|
|
- ./deployment/docker/grafana/dashboards:/etc/grafana/provisioning/dashboards:ro
|
|
- ./deployment/docker/grafana/datasources:/etc/grafana/provisioning/datasources:ro
|
|
depends_on:
|
|
- prometheus
|
|
restart: unless-stopped
|
|
networks:
|
|
- metabuilder-network
|
|
profiles:
|
|
- monitoring
|
|
|
|
volumes:
|
|
metabuilder-data:
|
|
driver: local
|
|
dbal-logs:
|
|
driver: local
|
|
prometheus-data:
|
|
driver: local
|
|
grafana-data:
|
|
driver: local
|
|
|
|
networks:
|
|
metabuilder-network:
|
|
driver: bridge
|