mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-12 11:40:44 +08:00
Simplifying the end to end docker setup to ensure it prepares the web database properly before the website starts.
This commit is contained in:
@@ -39,6 +39,15 @@ RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
# Copy over the prisma schema so we can to `npx prisma db push` and ensure the
|
||||
# database exists on startup.
|
||||
COPY --chown=nextjs:nodejs ./website/prisma/schema.prisma ./
|
||||
# Copy over a startup script that'll run `npx prisma db push` before starting
|
||||
# the webserver. This ensures the webserver can actually check user accounts.
|
||||
# This is a prisma variant of the postgres solution suggested in
|
||||
# https://docs.docker.com/compose/startup-order/
|
||||
COPY --chown=nextjs:nodejs ./website/wait-for-postgres.sh ./
|
||||
|
||||
# Automatically leverage output traces to reduce image size
|
||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
|
||||
Reference in New Issue
Block a user