97 lines
2.1 KiB
YAML
97 lines
2.1 KiB
YAML
version: '3.9'
|
|
|
|
# Core + Panel deployment for the main server.
|
|
# Usage: docker compose -f docker-compose.base.yml up -d
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: nexuma-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: change-me
|
|
POSTGRES_DB: nexuma
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- nexuma
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: nexuma-redis
|
|
restart: unless-stopped
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- nexuma
|
|
|
|
core:
|
|
image: nexuma/core:latest
|
|
container_name: nexuma-core
|
|
restart: unless-stopped
|
|
environment:
|
|
PORT: 3000
|
|
GRPC_PORT: 3002
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_USER: postgres
|
|
DB_PASSWORD: change-me
|
|
DB_NAME: nexuma
|
|
REDIS_HOST: redis
|
|
REDIS_PORT: 6379
|
|
JWT_SECRET: replace-with-long-random-secret
|
|
JWT_REFRESH_SECRET: replace-with-another-long-random-secret
|
|
JWT_EXPIRES_IN: 15m
|
|
JWT_REFRESH_EXPIRES_IN: 7d
|
|
CORS_ORIGINS: https://panel.example.com
|
|
# TELEGRAM_BOT_TOKEN: your-bot-token
|
|
ports:
|
|
- "3000:3000"
|
|
- "3002:3002"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- nexuma
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
panel:
|
|
image: nexuma/panel:latest
|
|
container_name: nexuma-panel
|
|
restart: unless-stopped
|
|
environment:
|
|
NUXT_CORE_URL: http://core:3000
|
|
NUXT_PUBLIC_API_BASE: /api
|
|
ports:
|
|
- "3010:3000"
|
|
depends_on:
|
|
- core
|
|
networks:
|
|
- nexuma
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
networks:
|
|
nexuma:
|
|
driver: bridge
|