version: '3.4' x-env: &x-env APP_KEY: "${APP_KEY}" BEATMAPS_DIFFICULTY_CACHE_SERVER_URL: http://beatmap-difficulty-lookup-cache BROADCAST_DRIVER: redis CACHE_DRIVER: redis DB_CONNECTION_STRING: Server=db;Database=osu;Uid=osuweb; DB_HOST: db ES_HOST: http://elasticsearch:9200 ES_SCORES_HOST: http://elasticsearch:9200 ES_SOLO_SCORES_HOST: http://elasticsearch:9200 GITHUB_TOKEN: "${GITHUB_TOKEN}" NOTIFICATION_REDIS_HOST: redis PASSPORT_PUBLIC_KEY: "${PASSPORT_PUBLIC_KEY:-}" REDIS_HOST: redis SESSION_DRIVER: redis x-web: &x-web build: context: ./docker/development dockerfile: ../../Dockerfile.development volumes: - .:/app environment: <<: *x-env services: php: <<: *x-web command: ['octane', '--watch'] deploy: restart_policy: condition: on-failure shm_size: '2gb' # for chromium assets: <<: *x-web command: ['watch'] job: <<: *x-web command: ['job'] schedule: <<: *x-web command: ['schedule'] migrator: <<: *x-web command: ['migrate'] depends_on: db: condition: service_healthy beatmap-difficulty-lookup-cache: image: pppy/osu-beatmap-difficulty-lookup-cache ports: - "${BEATMAPS_DIFFICULTY_CACHE_EXTERNAL_PORT:-5001}:80" notification-server: image: pppy/osu-notification-server depends_on: redis: condition: service_healthy db: condition: service_healthy volumes: - .env:/app/.env - ./storage/oauth-public.key:/app/oauth-public.key environment: <<: *x-env ports: - "${NOTIFICATION_EXTERNAL_PORT:-2345}:2345" notification-server-dusk: image: pppy/osu-notification-server depends_on: redis: condition: service_healthy db: condition: service_healthy volumes: - .env.dusk.local:/app/.env - ./storage/oauth-public.key:/app/oauth-public.key environment: <<: *x-env db: image: mysql/mysql-server:8.0 volumes: - database:/var/lib/mysql - ./docker/development/db_user.sql:/docker-entrypoint-initdb.d/db_user.sql environment: <<: *x-env MYSQL_ALLOW_EMPTY_PASSWORD: "yes" ports: - "${MYSQL_EXTERNAL_PORT:-3306}:3306" command: --default-authentication-plugin=mysql_native_password healthcheck: # important to use 127.0.0.1 instead of localhost as mysql starts twice. # the first time it listens on sockets but isn't actually ready # see https://github.com/docker-library/mysql/issues/663 test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"] interval: 1s timeout: 60s start_period: 60s redis: image: redis:latest ports: - "${REDIS_EXTERNAL_PORT:-6379}:6379" healthcheck: test: ["CMD", "redis-cli", "--raw", "incr", "ping"] interval: 1s timeout: 60s start_period: 60s elasticsearch: # Version must be kept up to date with library defined in: composer.json image: docker.elastic.co/elasticsearch/elasticsearch:7.17.6 ports: - "${ES_EXTERNAL_PORT:-9200}:9200" volumes: - elasticsearch:/usr/share/elasticsearch/data environment: action.auto_create_index: false discovery.type: single-node ES_JAVA_OPTS: "-Xms512m -Xmx512m" # less OOM on default settings. ingest.geoip.downloader.enabled: false healthcheck: test: curl -s http://localhost:9200/_cluster/health?wait_for_status=yellow >/dev/null || exit 1 interval: 1s timeout: 60s start_period: 60s nginx: image: nginx:latest depends_on: - php - notification-server - notification-server-dusk volumes: - ./docker/development/nginx-default.conf:/etc/nginx/conf.d/default.conf - .:/app ports: - "${NGINX_PORT:-8080}:80" score-indexer: image: pppy/osu-elastic-indexer command: ["queue", "watch", "--force-version"] depends_on: redis: condition: service_healthy db: condition: service_healthy elasticsearch: condition: service_healthy environment: <<: *x-env SCHEMA: "${SCHEMA:-1}" score-indexer-test: image: pppy/osu-elastic-indexer command: ["queue", "watch", "--force-version"] depends_on: redis: condition: service_healthy db: condition: service_healthy elasticsearch: condition: service_healthy environment: <<: *x-env # match with .env.testing.example DB_CONNECTION_STRING: Server=db;Database=osu_test;Uid=osuweb; ES_INDEX_PREFIX: test_ SCHEMA: test volumes: database: elasticsearch: