services: mysql: image: mysql:8.4 container_name: mysql restart: unless-stopped environment: MYSQL_DATABASE: php MYSQL_ROOT_PASSWORD: password MYSQL_PASSWORD: password MYSQL_USER: php healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-ppassword"] interval: 5s timeout: 5s retries: 30 nginx-php-fpm: image: ${IMAGE:-jkaninda/nginx-php-fpm:latest} container_name: nginx-php-fpm restart: unless-stopped depends_on: mysql: condition: service_healthy environment: DB_CONNECTION: mysql DB_HOST: mysql DB_PORT: 3306 DB_DATABASE: php DB_USERNAME: php DB_PASSWORD: password CLIENT_MAX_BODY_SIZE: 20M volumes: - ./laravel:/var/www/html ports: - "${HTTP_PORT:-80}:80"