version: '3.8' services: mysql: image: mysql:8.0 container_name: wifi_mysql restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: rootpass MYSQL_DATABASE: wifiplatform MYSQL_USER: wifiuser MYSQL_PASSWORD: wifipass ports: - "3306:3306" volumes: - mysql_data:/var/lib/mysql - ./schema.sql:/docker-entrypoint-initdb.d/01_schema.sql command: > --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "wifiuser", "-pwifipass"] interval: 10s timeout: 5s retries: 5 app: build: . container_name: wifi_app restart: unless-stopped depends_on: mysql: condition: service_healthy env_file: .env environment: DB_HOST: mysql ports: - "3000:3000" volumes: - ./public:/app/public volumes: mysql_data: