services: mariadb: image: mariadb:11-jammy container_name: home_mariadb environment: MYSQL_ROOT_PASSWORD: mac_mini_root_password MYSQL_DATABASE: home_management MYSQL_USER: homeuser MYSQL_PASSWORD: mac_mini_home_password ports: - "9305:3306" volumes: - mariadb_data:/var/lib/mysql - ./scripts/setup-db.sql:/docker-entrypoint-initdb.d/setup.sql - ./config/mariadb.cnf:/etc/mysql/conf.d/custom.cnf command: > --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb-buffer-pool-size=4G --innodb-log-file-size=512M --max-connections=200 --query-cache-size=256M restart: unless-stopped networks: - home_network phpmyadmin: image: phpmyadmin/phpmyadmin:latest container_name: home_phpmyadmin environment: PMA_HOST: mariadb PMA_PORT: 3306 PMA_USER: homeuser PMA_PASSWORD: mac_mini_home_password UPLOAD_LIMIT: 2G MEMORY_LIMIT: 512M ports: - "9304:80" depends_on: - mariadb restart: unless-stopped networks: - home_network redis: image: redis:7-alpine container_name: home_redis ports: - "9307:6379" volumes: - redis_data:/data - ./config/redis.conf:/usr/local/etc/redis/redis.conf command: redis-server /usr/local/etc/redis/redis.conf restart: unless-stopped networks: - home_network api: build: . container_name: home_api environment: NODE_ENV: production DB_HOST: mariadb DB_PORT: 3306 DB_NAME: home_management DB_USER: homeuser DB_PASSWORD: mac_mini_home_password REDIS_HOST: redis REDIS_PORT: 6379 JWT_SECRET: mac-mini-production-jwt-secret-key-2025 API_PORT: 3000 API_HOST: 0.0.0.0 CORS_ORIGIN: http://mac-mini-m4.local:3001,http://localhost:3001,http://192.168.1.100:3001 LOG_LEVEL: info BCRYPT_ROUNDS: 12 ports: - "9306:3000" volumes: - ./logs:/app/logs - ./uploads:/app/uploads - /Users/hyungiahn/home-management-data:/app/data depends_on: - mariadb - redis restart: unless-stopped networks: - home_network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s volumes: mariadb_data: driver: local driver_opts: type: none o: bind device: /Users/hyungiahn/home-management-db redis_data: driver: local driver_opts: type: none o: bind device: /Users/hyungiahn/home-management-redis networks: home_network: driver: bridge ipam: config: - subnet: 172.20.0.0/16