services: postgres: image: postgres:13 restart: unless-stopped environment: POSTGRES_USER: ${DB_USER} POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_DB: ${DB_NAME} ports: - "5433:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 minio: image: minio/minio restart: unless-stopped environment: MINIO_ROOT_USER: ${MINIO_ACCESS_KEY} MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY} command: server /data --console-address :9001 ports: - "9020:9000" # API port - "9021:9001" # WebUI port volumes: - minio_data:/data backend: # build: # context: . # dockerfile: Dockerfile.backend image: getmaxun/maxun-backend:latest restart: unless-stopped network_mode: "host" env_file: .env environment: BACKEND_URL: ${BACKEND_URL} # to ensure Playwright works in Docker PLAYWRIGHT_BROWSERS_PATH: /ms-playwright PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 0 # Force container/CI detection for headless mode CI: "true" CONTAINER: "true" # DEBUG: pw:api # PWDEBUG: 1 # Enables debugging CHROMIUM_FLAGS: '--disable-gpu --no-sandbox --headless=new' security_opt: - seccomp=unconfined # This might help with browser sandbox issues shm_size: '2gb' # Increase shared memory size for Chromium mem_limit: 6g # Set 6GB memory limit depends_on: - postgres - minio volumes: - /var/run/dbus:/var/run/dbus frontend: # build: # context: . # dockerfile: Dockerfile.frontend image: getmaxun/maxun-frontend:latest restart: unless-stopped network_mode: "host" env_file: .env environment: PUBLIC_URL: http://localhost:5174 BACKEND_URL: http://localhost:8081 VITE_BACKEND_URL: http://localhost:8081 VITE_PUBLIC_URL: http://localhost:5174 command: sh -c "npm run client" depends_on: - backend browser: build: context: . dockerfile: browser/Dockerfile args: BROWSER_WS_PORT: 3001 BROWSER_HEALTH_PORT: 3002 ports: - "3011:3001" - "3012:3002" environment: - NODE_ENV=production - DEBUG=pw:browser* - BROWSER_WS_PORT=${BROWSER_WS_PORT:-3001} - BROWSER_HEALTH_PORT=${BROWSER_HEALTH_PORT:-3002} - BROWSER_WS_HOST=${BROWSER_WS_HOST:-browser} - PLAYWRIGHT_BROWSERS_PATH=/ms-playwright restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:${BROWSER_HEALTH_PORT:-3002}/health"] interval: 10s timeout: 5s retries: 3 start_period: 10s deploy: resources: limits: memory: 2G cpus: '1.5' reservations: memory: 1G cpus: '1.0' security_opt: - seccomp:unconfined shm_size: 2gb cap_add: - SYS_ADMIN volumes: postgres_data: minio_data: