Files
AzerothCore-RealmMaster/docker-compose-azerothcore-tools.yml
uprightbass360 f66e3b7c47 variable cleanup
2025-09-30 14:52:48 -04:00

134 lines
4.6 KiB
YAML

# ==============================================
# AZEROTHCORE TOOLS DOCKER COMPOSE
# ==============================================
# Web interfaces and monitoring tools for AzerothCore
# This stack connects to the core AzerothCore database
services:
# PHPMyAdmin Database Management Interface
ac-phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: ac-phpmyadmin
environment:
PMA_HOST: ${PMA_HOST:-ac-mysql}
PMA_PORT: ${PMA_PORT:-3306}
PMA_USER: ${PMA_USER:-root}
PMA_PASSWORD: ${MYSQL_ROOT_PASSWORD:-password}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-password}
PMA_ARBITRARY: ${PMA_ARBITRARY:-1}
PMA_ABSOLUTE_URI: ${PMA_ABSOLUTE_URI:-}
UPLOAD_LIMIT: ${PMA_UPLOAD_LIMIT:-300M}
MEMORY_LIMIT: ${PMA_MEMORY_LIMIT:-512M}
MAX_EXECUTION_TIME: ${PMA_MAX_EXECUTION_TIME:-600}
ports:
- "${PMA_EXTERNAL_PORT:-8081}:80"
restart: unless-stopped
networks:
- azerothcore
# Keira3 Database Editor (Production Ready)
ac-keira3:
image: uprightbass360/keira3:latest
container_name: ac-keira3
restart: unless-stopped
environment:
- NODE_ENV=production
- KEIRA_PORT=8080
- KEIRA_HOST=0.0.0.0
- KEIRA_DATABASE_HOST=${KEIRA_DATABASE_HOST:-ac-mysql}
- KEIRA_DATABASE_PORT=${KEIRA_DATABASE_PORT:-3306}
- KEIRA_DATABASE_USER=root
- KEIRA_DATABASE_PASSWORD=${MYSQL_ROOT_PASSWORD:-password}
- KEIRA_DATABASE_NAME=acore_world
ports:
- "${KEIRA3_EXTERNAL_PORT:-4201}:8080"
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
reservations:
memory: 256M
cpus: '0.25'
healthcheck:
test: ["CMD", "sh", "-c", "curl -f http://localhost:8080/health || nc -z localhost 8080 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
security_opt:
- no-new-privileges:true
networks:
- azerothcore
# InfluxDB for Monitoring
ac-influxdb:
image: influxdb:2.7-alpine
container_name: ac-influxdb
environment:
DOCKER_INFLUXDB_INIT_MODE: ${INFLUXDB_INIT_MODE:-setup}
DOCKER_INFLUXDB_INIT_USERNAME: ${INFLUXDB_ADMIN_USER:-acore}
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_ADMIN_PASSWORD:-acore123}
DOCKER_INFLUXDB_INIT_ORG: ${INFLUXDB_ORG:-azerothcore}
DOCKER_INFLUXDB_INIT_BUCKET: ${INFLUXDB_BUCKET:-metrics}
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_TOKEN:-acore-monitoring-token-12345}
INFLUXDB_HTTP_AUTH_ENABLED: ${INFLUXDB_HTTP_AUTH_ENABLED:-true}
INFLUXDB_HTTP_HTTPS_ENABLED: ${INFLUXDB_HTTP_HTTPS_ENABLED:-false}
ports:
- "${INFLUXDB_EXTERNAL_PORT:-8087}:8086"
volumes:
- ${STORAGE_PATH_TOOLS:-./storage/azerothcore}/azerothcore/influxdb:/var/lib/influxdb2
restart: unless-stopped
networks:
- azerothcore
# Grafana Monitoring Dashboard
ac-grafana:
image: grafana/grafana:latest
container_name: ac-grafana
user: "0:0" # Run as root to handle NFS permissions
depends_on:
- ac-influxdb
environment:
GF_SECURITY_ADMIN_USER: ${GF_SECURITY_ADMIN_USER:-admin}
GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD:-acore123}
GF_INSTALL_PLUGINS: ${GF_PLUGINS_PREINSTALL:-grafana-piechart-panel}
GF_SERVER_ROOT_URL: ${GF_SERVER_ROOT_URL:-http://localhost:3001}
GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: ${GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION:-false}
GF_SECURITY_SECRET_KEY: ${GF_SECURITY_SECRET_KEY:-}
GF_USERS_ALLOW_SIGN_UP: ${GF_USERS_ALLOW_SIGN_UP:-false}
GF_USERS_ALLOW_ORG_CREATE: ${GF_USERS_ALLOW_ORG_CREATE:-false}
GF_AUTH_ANONYMOUS_ENABLED: ${GF_AUTH_ANONYMOUS_ENABLED:-false}
GF_SERVER_ENABLE_GZIP: ${GF_SERVER_ENABLE_GZIP:-true}
GF_SECURITY_COOKIE_SECURE: ${GF_SECURITY_COOKIE_SECURE:-false}
GF_SECURITY_COOKIE_SAMESITE: ${GF_SECURITY_COOKIE_SAMESITE:-lax}
ports:
- "${GF_EXTERNAL_PORT:-3001}:3000"
volumes:
- ${STORAGE_PATH_TOOLS:-./storage/azerothcore}/azerothcore/grafana:/var/lib/grafana
entrypoint: ["/bin/bash", "-c"]
command:
- |
echo "🔧 Setting up Grafana permissions..."
# Create directories with proper ownership
mkdir -p /var/lib/grafana
chown -R 472:472 /var/lib/grafana
chmod -R 755 /var/lib/grafana
echo "🚀 Starting Grafana server..."
exec su -s /bin/bash grafana -c "/run.sh"
restart: unless-stopped
networks:
- azerothcore
networks:
azerothcore:
external: true
name: azerothcore