mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 08:52:42 +00:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
99 lines
2.5 KiB
YAML
99 lines
2.5 KiB
YAML
name: proj-airi-backend
|
|
|
|
services:
|
|
db:
|
|
image: ghcr.io/tensorchord/vchord-postgres:pg18-v1.0.0
|
|
environment:
|
|
POSTGRES_DB: postgres
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: example-PAssw0rd-xHjDYR.b7N
|
|
ports:
|
|
- '127.0.0.1:5435:5432'
|
|
volumes:
|
|
- ./apps/api/sql/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
- db_data:/var/lib/postgresql
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- '127.0.0.1:6379:6379'
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
api:
|
|
build:
|
|
context: ..
|
|
dockerfile: server/apps/api/Dockerfile
|
|
command: ['pnpm', '-F', '@proj-airi/api-server', 'start']
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file:
|
|
- path: ./apps/api/.env
|
|
required: false
|
|
- path: ./apps/api/.env.local
|
|
required: false
|
|
environment:
|
|
API_SERVER_URL: http://localhost:6112
|
|
AUTH_SERVER_INTERNAL_URL: http://auth:3000
|
|
AUTH_SERVER_URL: http://localhost:6112
|
|
DATABASE_URL: postgres://postgres:example-PAssw0rd-xHjDYR.b7N@db:5432/postgres
|
|
REDIS_URL: redis://redis:6379
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'wget -qO- http://localhost:3000/readyz >/dev/null']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
auth:
|
|
build:
|
|
context: ..
|
|
dockerfile: server/apps/auth/Dockerfile
|
|
command: ['pnpm', '-F', '@proj-airi/auth-server', 'start']
|
|
depends_on:
|
|
api:
|
|
condition: service_healthy
|
|
env_file:
|
|
- path: ./apps/api/.env
|
|
required: false
|
|
- path: ./apps/api/.env.local
|
|
required: false
|
|
environment:
|
|
DATABASE_URL: postgres://postgres:example-PAssw0rd-xHjDYR.b7N@db:5432/postgres
|
|
PUBLIC_URL: http://localhost:6112
|
|
REDIS_URL: redis://redis:6379
|
|
RESOURCE_SERVER_URL: http://api:3000
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'wget -qO- http://localhost:3000/readyz >/dev/null']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
depends_on:
|
|
api:
|
|
condition: service_healthy
|
|
auth:
|
|
condition: service_healthy
|
|
ports:
|
|
- '127.0.0.1:6112:3000'
|
|
volumes:
|
|
- ./dev/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|
|
|
|
volumes:
|
|
db_data:
|
|
redis_data:
|