Compare commits

...

2 Commits

Author SHA1 Message Date
dab726e8d1 fix: add openssl to ai-service and fix its DATABASE_URL for Docker
- Dockerfile.ai: install openssl (required by Prisma native engine)
- docker-compose.yml: set DATABASE_URL to postgres:5432 instead of
  localhost, add postgres healthcheck dependency

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 10:11:42 +00:00
dd7c0afaf5 fix: add globalEnv to turbo.json to fix stale rewrite cache in Docker builds
Without explicit globalEnv, Turborepo could cache Next.js builds
with wrong INTERNAL_API_URL, causing web container to proxy to
127.0.0.1 instead of the Docker service name.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 10:01:30 +00:00
3 changed files with 5 additions and 0 deletions

View File

@ -88,11 +88,13 @@ services:
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"
NODE_ENV: production
depends_on:
postgres: { condition: service_healthy }
redis: { condition: service_healthy }
web:

View File

@ -1,5 +1,7 @@
FROM node:20-slim
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
WORKDIR /app

View File

@ -1,6 +1,7 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": [".env"],
"globalEnv": ["INTERNAL_API_URL", "API_URL", "NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY", "NEXT_PUBLIC_APP_URL"],
"tasks": {
"build": {
"dependsOn": ["^build"],