version: '3.9' services: app: build: . container_name: goadminx ports: - "8080:8080" environment: - GIN_MODE=release volumes: - ./server/config.yaml:/app/config.yaml - ./data/uploads:/app/uploads - ./data/logs:/app/logs - ./data/db:/app/data depends_on: redis: condition: service_healthy restart: unless-stopped redis: image: redis:7-alpine container_name: goadminx-redis ports: - "6379:6379" volumes: - ./data/redis:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 3 restart: unless-stopped # Optional: MySQL (uncomment if using MySQL instead of SQLite) # mysql: # image: mysql:8.0 # container_name: goadminx-mysql # environment: # MYSQL_ROOT_PASSWORD: root123 # MYSQL_DATABASE: goadminx # MYSQL_USER: admin # MYSQL_PASSWORD: admin123 # ports: # - "3306:3306" # volumes: # - ./data/mysql:/var/lib/mysql # restart: unless-stopped