fix(deploy): embed prisma migrate deploy in API startup
- Move prisma to runtime dependencies so it's available in prod image - API runs migrate deploy before starting (handles fresh installs + updates) - Remove separate migrate service from prod compose Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,16 +1,4 @@
|
||||
services:
|
||||
migrate:
|
||||
image: git.vicolab.de/schalli/tessera-ctl/api:latest
|
||||
command: sh -c "cd /app && node_modules/.bin/prisma migrate deploy --schema apps/api/prisma/schema.prisma"
|
||||
environment:
|
||||
DATABASE_URL: ${DATABASE_URL}
|
||||
networks:
|
||||
- data-net
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
restart: "no"
|
||||
|
||||
web:
|
||||
image: git.vicolab.de/schalli/tessera-ctl/web:latest
|
||||
restart: unless-stopped
|
||||
@@ -39,8 +27,6 @@ services:
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
environment:
|
||||
DATABASE_URL: ${DATABASE_URL}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
|
||||
Reference in New Issue
Block a user