59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
services:
|
|
web:
|
|
image: node:20
|
|
working_dir: /app/apps/web
|
|
command: sh -c "npm install && npm run dev"
|
|
ports:
|
|
- "${WEB_PORT:-3000}:3000"
|
|
volumes:
|
|
- ../..:/app
|
|
depends_on:
|
|
- api
|
|
|
|
api:
|
|
image: ${API_IMAGE:-xiaoxia-saas-api:dev}
|
|
build:
|
|
context: ../..
|
|
dockerfile: infra/docker/api.Dockerfile
|
|
env_file:
|
|
- ../../.env
|
|
environment:
|
|
APP_ENV: ${APP_ENV:-development}
|
|
ports:
|
|
- "${API_PORT:-8000}:8000"
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
|
|
worker:
|
|
image: ${WORKER_IMAGE:-xiaoxia-saas-worker:dev}
|
|
build:
|
|
context: ../..
|
|
dockerfile: infra/docker/worker.Dockerfile
|
|
env_file:
|
|
- ../../.env
|
|
environment:
|
|
APP_ENV: ${APP_ENV:-development}
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
|
|
postgres:
|
|
image: postgres:16
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-xiaoxia_saas}
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
ports:
|
|
- "${POSTGRES_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
redis:
|
|
image: redis:7
|
|
ports:
|
|
- "${REDIS_PORT:-6379}:6379"
|
|
|
|
volumes:
|
|
postgres_data:
|