File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,14 @@ RUN cd /temp/prod && bun install --frozen-lockfile --production
1717FROM base AS builder
1818COPY --from=install /temp/dev/node_modules node_modules
1919COPY . .
20- RUN apt-get update && apt-get install -y openssl
2120RUN bunx prisma generate
2221ENV NODE_ENV=production
2322RUN bun run build
2423
2524FROM base AS runner
2625WORKDIR /app
2726ENV NODE_ENV=production
27+ RUN apt-get update && apt-get install -y openssl
2828RUN addgroup --system --gid 1001 nodejs
2929RUN adduser --system --uid 1001 nextjs
3030
@@ -35,13 +35,13 @@ COPY --from=builder /usr/src/app/prisma ./prisma
3535COPY --from=builder /usr/src/app/node_modules/.prisma ./node_modules/.prisma
3636COPY --from=builder /usr/src/app/node_modules/@prisma ./node_modules/@prisma
3737
38- COPY --chown=nextjs:nodejs <<EOF /app/start.sh
39- # !/bin/sh
40- echo "Applying database migrations..."
41- bunx prisma migrate deploy
42- echo "Starting the application..."
43- exec bun server.js
44- EOF
38+ RUN echo '#!/bin/sh' > /app/start.sh && \
39+ echo 'echo "Applying database migrations..."' >> /app/start.sh && \
40+ echo 'bunx prisma migrate deploy' >> /app/start.sh && \
41+ echo 'echo "Starting the application..."' >> /app/start.sh && \
42+ echo 'exec bun server.js' >> /app/start.sh && \
43+ chmod +x /app/start.sh && \
44+ chown nextjs:nodejs /app/start.sh
4545
4646RUN chmod +x /app/start.sh
4747
You can’t perform that action at this time.
0 commit comments