92 lines
2.4 KiB
YAML
92 lines
2.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:13
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_DB: ${DB_NAME}
|
|
ports:
|
|
- "${DB_PORT}:${DB_PORT}"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:6
|
|
environment:
|
|
REDIS_HOST: ${REDIS_HOST}
|
|
REDIS_PORT: ${REDIS_PORT}
|
|
ports:
|
|
- "${REDIS_PORT}:${REDIS_PORT}"
|
|
volumes:
|
|
- redis_data:/data
|
|
|
|
minio:
|
|
image: minio/minio
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
|
|
command: server /data --console-address :${MINIO_CONSOLE_PORT}
|
|
ports:
|
|
- "${MINIO_PORT}:${MINIO_PORT}" # API port
|
|
- "${MINIO_CONSOLE_PORT}:${MINIO_CONSOLE_PORT}" # WebUI port
|
|
volumes:
|
|
- minio_data:/data
|
|
|
|
backend:
|
|
#build:
|
|
#context: .
|
|
#dockerfile: server/Dockerfile
|
|
image: getmaxun/maxun-backend:v0.0.2
|
|
ports:
|
|
- "${BACKEND_PORT}:${BACKEND_PORT}"
|
|
env_file: .env
|
|
environment:
|
|
BACKEND_URL: ${BACKEND_URL}
|
|
# to ensure Playwright works in Docker
|
|
PLAYWRIGHT_BROWSERS_PATH: /ms-playwright
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 0
|
|
# 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: 2g # Set a 2GB memory limit
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
- minio
|
|
volumes:
|
|
- ./server:/app/server # Mount server source code for hot reloading
|
|
- ./maxun-core:/app/maxun-core # Mount maxun-core for any shared code updates
|
|
- /var/run/dbus:/var/run/dbus
|
|
|
|
frontend:
|
|
#build:
|
|
#context: .
|
|
#dockerfile: Dockerfile
|
|
image: getmaxun/maxun-frontend:v0.0.1
|
|
ports:
|
|
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
|
|
env_file: .env
|
|
environment:
|
|
PUBLIC_URL: ${PUBLIC_URL}
|
|
BACKEND_URL: ${BACKEND_URL}
|
|
volumes:
|
|
- ./:/app # Mount entire frontend app directory for hot reloading
|
|
- /app/node_modules # Anonymous volume to prevent overwriting node_modules
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
postgres_data:
|
|
minio_data:
|
|
redis_data:
|