59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: langlearn_test
|
|
POSTGRES_PASSWORD: testpassword
|
|
POSTGRES_DB: langlearn_test
|
|
tmpfs:
|
|
- /var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U langlearn_test"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
storage:
|
|
image: minio/minio:latest
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: langlearn_test
|
|
MINIO_ROOT_PASSWORD: testpassword123
|
|
tmpfs:
|
|
- /data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -sf http://localhost:9000/minio/health/live || exit 1"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
api:
|
|
build: ./api
|
|
ports:
|
|
- "18000:8000"
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://langlearn_test:testpassword@db:5432/langlearn_test
|
|
JWT_SECRET: test-jwt-secret-not-for-production
|
|
ANTHROPIC_API_KEY: test-key
|
|
DEEPL_API_KEY: test-key
|
|
DEEPGRAM_API_KEY: test-key
|
|
GEMINI_API_KEY: test-key
|
|
ADMIN_USER_EMAILS: admin@test.com
|
|
API_BASE_URL: http://localhost:18000
|
|
STORAGE_ENDPOINT_URL: http://storage:9000
|
|
STORAGE_ACCESS_KEY: langlearn_test
|
|
STORAGE_SECRET_KEY: testpassword123
|
|
STORAGE_BUCKET: langlearn-test
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
storage:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test:
|
|
- "CMD-SHELL"
|
|
- "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health')\""
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 10s
|