120 lines
3.2 KiB
YAML
120 lines
3.2 KiB
YAML
services:
|
|
postgres:
|
|
image: pgvector/pgvector:pg16
|
|
container_name: coursecraft-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: coursecraft
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- ./data/postgres:/var/lib/postgresql/data
|
|
- ./init-scripts:/docker-entrypoint-initdb.d
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: coursecraft-redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6395:6379"
|
|
volumes:
|
|
- ./data/redis:/data
|
|
command: redis-server --appendonly yes
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
meilisearch:
|
|
image: getmeili/meilisearch:v1.6
|
|
container_name: coursecraft-meilisearch
|
|
restart: unless-stopped
|
|
environment:
|
|
MEILI_MASTER_KEY: ${MEILISEARCH_API_KEY:-coursecraft-dev-key}
|
|
MEILI_ENV: development
|
|
ports:
|
|
- "7700:7700"
|
|
volumes:
|
|
- ./data/meilisearch:/meili_data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile.api
|
|
container_name: coursecraft-api
|
|
restart: unless-stopped
|
|
env_file: ../.env
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/coursecraft?schema=public
|
|
REDIS_URL: redis://redis:6379
|
|
REDIS_HOST: redis
|
|
REDIS_PORT: "6379"
|
|
MEILISEARCH_HOST: http://meilisearch:7700
|
|
PORT: "3125"
|
|
NODE_ENV: production
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
SUPABASE_SERVICE_ROLE_KEY: ${SUPABASE_SERVICE_ROLE_KEY}
|
|
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL}
|
|
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY}
|
|
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3080}
|
|
ports:
|
|
- "3125:3125"
|
|
depends_on:
|
|
postgres: { condition: service_healthy }
|
|
redis: { condition: service_healthy }
|
|
meilisearch: { condition: service_healthy }
|
|
|
|
ai-service:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile.ai
|
|
container_name: coursecraft-ai-service
|
|
restart: unless-stopped
|
|
env_file: ../.env
|
|
environment:
|
|
REDIS_URL: redis://redis:6379
|
|
REDIS_HOST: redis
|
|
REDIS_PORT: "6379"
|
|
NODE_ENV: production
|
|
depends_on:
|
|
redis: { condition: service_healthy }
|
|
|
|
web:
|
|
build:
|
|
context: ..
|
|
dockerfile: docker/Dockerfile.web
|
|
args:
|
|
API_URL: http://api:3125
|
|
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL}
|
|
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY}
|
|
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3080}
|
|
container_name: coursecraft-web
|
|
restart: unless-stopped
|
|
env_file: ../.env
|
|
environment:
|
|
API_URL: http://api:3125
|
|
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3080}
|
|
PORT: "3080"
|
|
NODE_ENV: production
|
|
ports:
|
|
- "3080:3080"
|
|
depends_on:
|
|
- api
|
|
|
|
networks:
|
|
default:
|
|
name: coursecraft-network
|