name: egbim-qa-platform services: web: build: context: .. dockerfile: docker/web.dockerfile network: host args: NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmmirror.com} environment: NEXT_PUBLIC_API_BASE_URL: ${WEB_PUBLIC_API_BASE_URL:-http://localhost:4010} INTERNAL_API_BASE_URL: http://api:4000 SUPPORT_API_BASE_URL: http://secretary-api:8010 SECRETARY_ABC_API_KEY: ${SECRETARY_ABC_API_KEY:-MASTER_API_KEY} HOSTNAME: 0.0.0.0 ports: - "${WEB_PORT:-3003}:3000" depends_on: api: condition: service_healthy secretary-api: condition: service_healthy healthcheck: test: ['CMD-SHELL', 'wget -q -O - http://127.0.0.1:3000/api/health >/dev/null'] interval: 10s timeout: 5s retries: 12 start_period: 20s restart: unless-stopped api: build: context: .. dockerfile: docker/api.dockerfile network: host args: NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmmirror.com} env_file: - ../apps/api/.env environment: APP_ADDRESS: 0.0.0.0 APP_PORT: 4000 ADMIN_WEB_URL: http://localhost:3003 BASE_URL: http://localhost:3003 MYSQL_PRIMARY_URL: mysql://userfeedback:userfeedback@mysql:3306/userfeedback SMTP_HOST: smtp4dev SMTP_PORT: 25 SUPPORT_API_BASE_URL: http://secretary-api:8010 ports: - "${API_PORT:-4010}:4000" depends_on: mysql: condition: service_healthy healthcheck: test: ['CMD-SHELL', 'wget -q -O - http://127.0.0.1:4000/api/health >/dev/null'] interval: 10s timeout: 5s retries: 12 start_period: 20s restart: unless-stopped secretary-api: build: context: .. dockerfile: docker/secretary-api.dockerfile network: host env_file: - ../apps/secretary-api/.env environment: APP_HOST: 0.0.0.0 APP_PORT: 8010 DATABASE_URL: mysql+pymysql://baron_support:baron_support@mysql-secretary:3306/baron_support ABC_API_BASE_URL: http://api:4000 ABC_API_KEY: ${SECRETARY_ABC_API_KEY:-MASTER_API_KEY} UPLOAD_ROOT_DIR: /app/uploads UPLOAD_MAX_FILE_SIZE_MB: ${UPLOAD_MAX_FILE_SIZE_MB:-30} DEFAULT_SUPPORT_WORKSPACE_CODE: ${DEFAULT_SUPPORT_WORKSPACE_CODE:-EGBIM_DEMO} ports: - "${SECRETARY_API_PORT:-8011}:8010" depends_on: api: condition: service_healthy mysql-secretary: condition: service_healthy healthcheck: test: [ 'CMD-SHELL', "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8010/api/health')\"", ] interval: 10s timeout: 5s retries: 12 start_period: 20s volumes: - ../uploads:/app/uploads restart: unless-stopped mysql: image: mysql:8.0 command: [ '--default-authentication-plugin=mysql_native_password', '--collation-server=utf8mb4_bin', ] environment: MYSQL_ROOT_PASSWORD: userfeedback MYSQL_DATABASE: userfeedback MYSQL_USER: userfeedback MYSQL_PASSWORD: userfeedback TZ: UTC ports: - "${MYSQL_PORT:-13309}:3306" healthcheck: test: [ 'CMD-SHELL', 'mysqladmin ping -h 127.0.0.1 -u root -p$$MYSQL_ROOT_PASSWORD --silent', ] interval: 5s timeout: 5s retries: 30 start_period: 15s volumes: - mysql-local:/var/lib/mysql restart: unless-stopped mysql-secretary: hostname: mysql-secretary image: mysql:8.0 command: [ '--default-authentication-plugin=mysql_native_password', '--collation-server=utf8mb4_bin', '--default-time-zone=+09:00', ] environment: MYSQL_ROOT_PASSWORD: baron_support MYSQL_DATABASE: baron_support MYSQL_USER: baron_support MYSQL_PASSWORD: baron_support TZ: Asia/Seoul ports: - "${MYSQL_SECRETARY_PORT:-13310}:3306" healthcheck: test: [ 'CMD-SHELL', 'mysqladmin ping -h 127.0.0.1 -u root -p$$MYSQL_ROOT_PASSWORD --silent', ] interval: 5s timeout: 5s retries: 30 start_period: 15s volumes: - mysql-secretary-local:/var/lib/mysql restart: unless-stopped smtp4dev: image: rnwood/smtp4dev:v3 ports: - "${SMTP_WEB_PORT:-5081}:80" - "${SMTP_PORT_HOST:-2525}:25" - "${SMTP_IMAP_PORT:-1143}:143" volumes: - smtp4dev-local:/smtp4dev restart: unless-stopped volumes: mysql-local: mysql-secretary-local: smtp4dev-local: