We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 77c1824 + ae8f6d6 commit 888834cCopy full SHA for 888834c
2 files changed
backend/Dockerfile
@@ -36,8 +36,9 @@ COPY package*.json ./
36
# Install production dependencies only
37
RUN npm ci --only=production
38
39
-# Copy prisma schema and migrations
+# Copy prisma schema and migrations for runtime and hydration template
40
COPY prisma ./prisma/
41
+COPY prisma ./prisma_template/
42
43
# Copy built application from builder
44
COPY --from=builder /app/dist ./dist
backend/docker-entrypoint.sh
@@ -1,6 +1,12 @@
1
#!/bin/sh
2
set -e
3
4
+# Auto-hydrate prisma directory when bind-mounted volume is empty
5
+if [ ! -f "/app/prisma/schema.prisma" ]; then
6
+ echo "Mount is empty. Hydrating /app/prisma from /app/prisma_template..."
7
+ cp -R /app/prisma_template/. /app/prisma/
8
+fi
9
+
10
# Run migrations
11
npx prisma migrate deploy
12
0 commit comments