docker/docker-compose.mariadb.yml
Rama main · réplica de lectura del repositorio original.
# Docker Compose for ActaLog with MariaDB
# Usage: docker compose -f docker-compose.mariadb.yml up -d
version: '3.8'
services:
mariadb:
image: mariadb:11-jammy
container_name: actalog-mariadb
restart: unless-stopped
environment:
- MARIADB_DATABASE=${DB_NAME:-actalog}
- MARIADB_USER=${DB_USER:-actalog}
- MARIADB_PASSWORD=${DB_PASSWORD:?Database password required}
- MARIADB_ROOT_PASSWORD=${DB_ROOT_PASSWORD:?Root password required}
- MARIADB_CHARACTER_SET=utf8mb4
- MARIADB_COLLATION=utf8mb4_unicode_ci
volumes:
- mariadb-data:/var/lib/mysql
networks:
- actalog-network
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "3306:3306" # Expose for debugging (remove in production)
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
actalog:
image: ghcr.io/${GITHUB_OWNER:-yourusername}/actalog:${TAG:-latest}
container_name: actalog
restart: unless-stopped
depends_on:
mariadb:
condition: service_healthy
ports:
- "${PORT:-8080}:8080"
environment:
# MariaDB/MySQL Configuration
- DB_DRIVER=mysql
- DB_HOST=mariadb
- DB_PORT=3306
- DB_NAME=${DB_NAME:-actalog}
- DB_USER=${DB_USER:-actalog}
- DB_PASSWORD=${DB_PASSWORD:?Database password required}
# Application Configuration
- PORT=8080
- APP_URL=${APP_URL:-http://localhost:8080}
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:8080}
# JWT Configuration
- JWT_SECRET=${JWT_SECRET:?JWT secret required}
- JWT_ACCESS_EXPIRY=${JWT_ACCESS_EXPIRY:-15m}
- JWT_REFRESH_EXPIRY=${JWT_REFRESH_EXPIRY:-7d}
# Email Configuration (optional)
- EMAIL_FROM=${EMAIL_FROM:-}
- SMTP_HOST=${SMTP_HOST:-}
- SMTP_PORT=${SMTP_PORT:-}
- SMTP_USER=${SMTP_USER:-}
- SMTP_PASS=${SMTP_PASS:-}
# Automatic Seed Import (optional)
# Set these to enable automatic import of movements and WODs from CSV files on first run
# The first user you create should match these credentials
- ADMIN_EMAIL=${ADMIN_EMAIL:-}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
volumes:
- actalog-uploads:/app/uploads
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
networks:
- actalog-network
volumes:
mariadb-data:
driver: local
actalog-uploads:
driver: local
networks:
actalog-network:
driver: bridge