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>
This commit is contained in:
root
2026-02-06 10:11:42 +00:00
parent dd7c0afaf5
commit dab726e8d1
2 changed files with 4 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