services: app: build: context: . dockerfile: resources/docker/Dockerfile args: PHP_VERSION: ${PHP_VERSION:-8.5} PHALCON_VARIANT: ${PHALCON_VARIANT:-v5} UID: ${UID:-1000} GID: ${GID:-1000} container_name: ${PROJECT_PREFIX:-vokuro}-app hostname: ${PROJECT_PREFIX:-vokuro}-app ports: # Host port is configurable (APP_PORT) so multiple apps can coexist; # the container always listens on 8080. - "${APP_PORT:-8080}:8080" volumes: - .:/srv env_file: .env depends_on: mysql: condition: service_healthy mailpit: condition: service_started mysql: image: mysql:8.0 container_name: ${PROJECT_PREFIX:-vokuro}-mysql environment: MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-secret} MYSQL_DATABASE: ${DB_NAME:-vokuro} # No host port published: the app reaches the DB over the internal compose # network as mysql:3306. Not exposed to the host by design. healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-p${DB_PASSWORD:-secret}"] interval: 5s timeout: 5s retries: 12 mailpit: image: axllent/mailpit:latest container_name: ${PROJECT_PREFIX:-vokuro}-mailpit ports: - "${MAILPIT_HTTP:-8025}:8025"