Files
parcer/docker-compose.yml

118 lines
3.0 KiB
YAML
Raw Normal View History

2024-10-24 18:57:07 +05:30
services:
2024-11-01 16:03:48 +05:30
postgres:
2024-10-30 12:04:38 +05:30
image: postgres:13
restart: unless-stopped
2024-10-24 18:57:07 +05:30
environment:
2024-10-29 23:42:58 +05:30
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
2024-11-01 16:03:48 +05:30
POSTGRES_DB: ${DB_NAME}
2024-10-29 23:42:58 +05:30
ports:
- "5433:5432"
2024-10-24 18:57:07 +05:30
volumes:
- postgres_data:/var/lib/postgresql/data
2024-10-30 21:38:00 +05:30
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
2024-10-24 18:57:07 +05:30
minio:
image: minio/minio
restart: unless-stopped
2024-10-29 23:42:58 +05:30
environment:
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
command: server /data --console-address :9001
2024-10-24 18:57:07 +05:30
ports:
- "9020:9000" # API port
- "9021:9001" # WebUI port
2024-10-24 18:57:07 +05:30
volumes:
- minio_data:/data
2024-11-01 16:03:48 +05:30
backend:
2025-11-30 20:45:51 +05:30
# build:
# context: .
# dockerfile: Dockerfile.backend
2025-01-13 16:12:48 +05:30
image: getmaxun/maxun-backend:latest
restart: unless-stopped
network_mode: "host"
2024-11-01 16:03:48 +05:30
env_file: .env
2024-11-01 16:28:17 +05:30
environment:
BACKEND_URL: ${BACKEND_URL}
2024-11-01 16:28:17 +05:30
# to ensure Playwright works in Docker
PLAYWRIGHT_BROWSERS_PATH: /ms-playwright
2024-11-03 01:08:29 +05:30
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 0
2025-09-08 12:24:04 +05:30
# Force container/CI detection for headless mode
CI: "true"
CONTAINER: "true"
2024-11-03 01:08:29 +05:30
# 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
2024-12-04 19:52:17 +05:30
shm_size: '2gb' # Increase shared memory size for Chromium
2026-02-06 15:22:17 +05:30
mem_limit: 6g # Set 6GB memory limit
2024-11-01 16:03:48 +05:30
depends_on:
- postgres
- minio
volumes:
- /var/run/dbus:/var/run/dbus
2024-10-30 05:47:58 +05:30
2024-11-01 16:03:48 +05:30
frontend:
2025-11-30 20:45:51 +05:30
# build:
# context: .
# dockerfile: Dockerfile.frontend
2025-01-13 16:12:48 +05:30
image: getmaxun/maxun-frontend:latest
restart: unless-stopped
network_mode: "host"
2024-11-01 16:03:48 +05:30
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"
2024-11-01 07:41:38 +05:30
depends_on:
2024-11-01 16:03:48 +05:30
- backend
2024-11-01 07:41:38 +05:30
2025-11-30 17:41:44 +05:30
browser:
build:
context: .
dockerfile: browser/Dockerfile
args:
BROWSER_WS_PORT: 3001
BROWSER_HEALTH_PORT: 3002
2025-11-30 17:41:44 +05:30
ports:
- "3011:3001"
- "3012:3002"
2025-11-30 17:41:44 +05:30
environment:
- NODE_ENV=production
- DEBUG=pw:browser*
- BROWSER_WS_PORT=${BROWSER_WS_PORT:-3001}
- BROWSER_HEALTH_PORT=${BROWSER_HEALTH_PORT:-3002}
2025-11-30 22:13:49 +05:30
- BROWSER_WS_HOST=${BROWSER_WS_HOST:-browser}
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
2025-11-30 17:41:44 +05:30
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
2024-10-24 18:57:07 +05:30
volumes:
postgres_data:
2025-04-05 18:19:16 +05:30
minio_data: