services: app: build: . container_name: spota-app restart: unless-stopped expose: - "80" environment: APP_URL: ${APP_URL:-http://localhost} DB_HOST: ${DB_HOST:-db} DB_USER: ${DB_USER:-spota_user} DB_PASSWORD: ${DB_PASSWORD:-spota_password} DB_NAME: ${DB_NAME:-spota_spotadb} DB_SPOTA: ${DB_SPOTA:-spota_spotadb} DB_KONSULTASI: ${DB_KONSULTASI:-spota_konsultasi} DB_BIO: ${DB_BIO:-spota_spotadb} DB_DOSEN: ${DB_DOSEN:-spota_spotadb} SERVICE_DB_NAME: ${SERVICE_DB_NAME:-spota_spotadb} PHP_DISPLAY_ERRORS: ${PHP_DISPLAY_ERRORS:-1} FILES_STORAGE_PATH: ${FILES_STORAGE_PATH:-/var/www/html/files} volumes: - spota_files:/var/www/html/files - spota_img:/var/www/html/img depends_on: db: condition: service_healthy db: image: mysql:8.0 container_name: spota-db restart: unless-stopped command: --default-authentication-plugin=mysql_native_password --character-set-server=latin1 --collation-server=latin1_swedish_ci environment: MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root_password} MYSQL_USER: ${DB_USER:-spota_user} MYSQL_PASSWORD: ${DB_PASSWORD:-spota_password} MYSQL_DATABASE: ${DB_NAME:-spota_spotadb} volumes: - spota_db_data:/var/lib/mysql - ./docker/mysql-init:/docker-entrypoint-initdb.d:ro - ./spota_db:/spota_db:ro healthcheck: test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -p$${MYSQL_ROOT_PASSWORD}"] interval: 10s timeout: 5s retries: 20 volumes: spota_db_data: spota_files: spota_img: