Files
Mace-AIO-Discord-Bot---With…/docker-compose.yml
2026-07-21 17:35:08 +02:00

100 lines
3.0 KiB
YAML

# HexaHost — Bot + Dashboard behind Traefik
#
# Prerequisites:
# - External Docker network: traefik-network
# - Traefik already running and attached to that network
# - Copy .env.docker.example → .env and fill secrets
#
# Start:
# docker compose up -d --build
name: hexahost
services:
bot:
build:
context: ./bot
dockerfile: Dockerfile
container_name: hexahost-bot
restart: unless-stopped
env_file:
- .env
environment:
API_ENABLED: "true"
API_HOST: "0.0.0.0"
API_PORT: "8000"
TUNNEL_ENABLED: "false"
CORS_ORIGINS: "https://bot.hexahost.de"
volumes:
- bot-db:/app/db
- bot-jsondb:/app/jsondb
- bot-logs:/app/logs
networks:
- traefik-network
- hexahost-internal
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import socket; s=socket.create_connection(('127.0.0.1',8000),5); s.close()",
]
interval: 30s
timeout: 10s
retries: 5
start_period: 90s
dashboard:
build:
context: ./dashboard
dockerfile: Dockerfile
args:
NEXT_PUBLIC_BRAND_NAME: ${NEXT_PUBLIC_BRAND_NAME:-HexaHost}
NEXT_PUBLIC_BRAND_NAME_WORD: ${NEXT_PUBLIC_BRAND_NAME_WORD:-HH}
NEXT_PUBLIC_ADMIN_IDS: ${NEXT_PUBLIC_ADMIN_IDS:-}
container_name: hexahost-dashboard
restart: unless-stopped
depends_on:
bot:
condition: service_started
env_file:
- .env
environment:
# Server-side proxy → Bot API (Docker-intern, nicht öffentlich)
DASHBOARD_API_URL: http://bot:8000/api/v1
NEXTAUTH_URL: https://bot.hexahost.de/
NEXT_PUBLIC_BRAND_NAME: ${NEXT_PUBLIC_BRAND_NAME:-HexaHost}
NEXT_PUBLIC_BRAND_NAME_WORD: ${NEXT_PUBLIC_BRAND_NAME_WORD:-HH}
PORT: "3000"
HOSTNAME: "0.0.0.0"
networks:
- traefik-network
- hexahost-internal
labels:
- traefik.enable=true
- traefik.docker.network=traefik-network
# HTTP → HTTPS redirect (optional, falls Entrypoint "web" existiert)
- traefik.http.routers.hexahost-dashboard-http.rule=Host(`bot.hexahost.de`)
- traefik.http.routers.hexahost-dashboard-http.entrypoints=web
- traefik.http.routers.hexahost-dashboard-http.middlewares=hexahost-https-redirect
- traefik.http.middlewares.hexahost-https-redirect.redirectscheme.scheme=https
- traefik.http.middlewares.hexahost-https-redirect.redirectscheme.permanent=true
# HTTPS
- traefik.http.routers.hexahost-dashboard.rule=Host(`bot.hexahost.de`)
- traefik.http.routers.hexahost-dashboard.entrypoints=websecure
- traefik.http.routers.hexahost-dashboard.tls=true
- traefik.http.routers.hexahost-dashboard.tls.certresolver=${TRAEFIK_CERT_RESOLVER:-letsencrypt}
- traefik.http.services.hexahost-dashboard.loadbalancer.server.port=3000
networks:
traefik-network:
external: true
hexahost-internal:
driver: bridge
volumes:
bot-db:
bot-jsondb:
bot-logs: