- Added package.json for @proj-airi/server-protocol with necessary configurations. - Implemented chat event types including WireMessage, SendMessagesRequest, and PullMessagesRequest. - Defined WebSocket event types and structures for better integration with AIRI components. - Updated server-runtime and server-sdk to utilize the new server-protocol package. - Refactored imports across various packages to replace server-shared types with server-protocol types. - Enhanced type definitions and added TypeScript configurations for better development experience.
95 lines
2.2 KiB
YAML
95 lines
2.2 KiB
YAML
name: proj-airi-server
|
|
|
|
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:
|
|
- '5435:5432'
|
|
volumes:
|
|
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
- 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:
|
|
- '6379:6379'
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
api:
|
|
build:
|
|
context: ../..
|
|
dockerfile: apps/server/Dockerfile
|
|
command: ['pnpm', '-F', '@proj-airi/server', 'run', 'server', 'api']
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
- path: .env.local
|
|
required: false
|
|
ports:
|
|
- '6112:3000'
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'curl -f http://localhost:3000/health || exit 1']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
outbox-dispatcher:
|
|
build:
|
|
context: ../..
|
|
dockerfile: apps/server/Dockerfile
|
|
command: ['pnpm', '-F', '@proj-airi/server', 'run', 'server', 'outbox-dispatcher']
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
- path: .env.local
|
|
required: false
|
|
restart: unless-stopped
|
|
|
|
cache-sync-consumer:
|
|
build:
|
|
context: ../..
|
|
dockerfile: apps/server/Dockerfile
|
|
command: ['pnpm', '-F', '@proj-airi/server', 'run', 'server', 'cache-sync-consumer']
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
- path: .env.local
|
|
required: false
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
db_data:
|
|
driver: local
|
|
redis_data:
|
|
driver: local
|