Files
parcer/docker-compose.yml

115 lines
3.1 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:
2024-12-04 20:24:37 +05:30
- "${DB_PORT:-5432}:${DB_PORT:-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}
2024-12-04 20:34:01 +05:30
command: server /data --console-address :${MINIO_CONSOLE_PORT:-9001}
2024-10-24 18:57:07 +05:30
ports:
2024-12-04 20:24:37 +05:30
- "${MINIO_PORT:-9000}:${MINIO_PORT:-9000}" # API port
- "${MINIO_CONSOLE_PORT:-9001}:${MINIO_CONSOLE_PORT:-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
2024-10-30 05:47:58 +05:30
ports:
2024-12-04 20:24:37 +05:30
- "${BACKEND_PORT:-8080}:${BACKEND_PORT:-8080}"
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
mem_limit: 2g # Set a 2GB 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
2024-11-01 07:41:38 +05:30
ports:
2024-12-04 20:24:37 +05:30
- "${FRONTEND_PORT:-5173}:${FRONTEND_PORT:-5173}"
2024-11-01 16:03:48 +05:30
env_file: .env
environment:
PUBLIC_URL: ${PUBLIC_URL}
BACKEND_URL: ${BACKEND_URL}
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: ${BROWSER_WS_PORT:-3001}
BROWSER_HEALTH_PORT: ${BROWSER_HEALTH_PORT:-3002}
ports:
- "${BROWSER_WS_PORT:-3001}:${BROWSER_WS_PORT:-3001}"
- "${BROWSER_HEALTH_PORT:-3002}:${BROWSER_HEALTH_PORT:-3002}"
environment:
- NODE_ENV=production
- DEBUG=pw:browser*
- BROWSER_WS_PORT=${BROWSER_WS_PORT:-3001}
- BROWSER_HEALTH_PORT=${BROWSER_HEALTH_PORT:-3002}
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: