Compare commits
2 Commits
6ebebfad9a
...
1de1c9dcde
| Author | SHA1 | Date | |
|---|---|---|---|
| 1de1c9dcde | |||
| 2f94039f02 |
@@ -90,8 +90,6 @@ COPY --from=builder /app/node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/
|
|||||||
COPY --from=builder /app/node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node /app/apps/admin/.next/server/
|
COPY --from=builder /app/node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node /app/apps/admin/.next/server/
|
||||||
COPY --from=builder /app/node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/schema.prisma /app/apps/admin/.next/server/
|
COPY --from=builder /app/node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/schema.prisma /app/apps/admin/.next/server/
|
||||||
|
|
||||||
COPY --from=builder /app/packages/shared/prisma/migrations ./packages/shared/prisma/migrations
|
|
||||||
|
|
||||||
# Install Prisma CLI globally for runtime migrations
|
# Install Prisma CLI globally for runtime migrations
|
||||||
RUN npm install -g prisma@5.22.0
|
RUN npm install -g prisma@5.22.0
|
||||||
|
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ run_with_retries() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Prefer migration-based deploys. Fall back to db push when no migrations exist yet.
|
# Prefer migration-based deploys. Fall back to db push when no migrations exist yet.
|
||||||
set -- "$MIGRATIONS_DIR"/*/migration.sql
|
# set -- "$MIGRATIONS_DIR"/*/migration.sql
|
||||||
if [ -f "$1" ]; then
|
# if [ -f "$1" ]; then
|
||||||
echo "Applying Prisma migrations..."
|
# echo "Applying Prisma migrations..."
|
||||||
run_with_retries npx prisma migrate deploy --schema=./packages/shared/prisma/schema.prisma
|
# run_with_retries npx prisma migrate deploy --schema=./packages/shared/prisma/schema.prisma
|
||||||
else
|
# else
|
||||||
echo "No Prisma migrations found. Syncing schema with db push..."
|
# echo "No Prisma migrations found. Syncing schema with db push..."
|
||||||
run_with_retries npx prisma db push --skip-generate --schema=./packages/shared/prisma/schema.prisma
|
# run_with_retries npx prisma db push --skip-generate --schema=./packages/shared/prisma/schema.prisma
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
echo "Starting Next.js server..."
|
echo "Starting Next.js server..."
|
||||||
exec node apps/admin/server.js
|
exec node apps/admin/server.js
|
||||||
|
|||||||
Reference in New Issue
Block a user