feat: add automatic database migration and seeding on docker startup
All checks were successful
Staging Build / build (push) Successful in 2m47s

This commit is contained in:
DanielS
2026-06-23 03:14:40 +02:00
parent 235efd5a47
commit 756ec5c002
4 changed files with 245 additions and 1 deletions

View File

@@ -34,6 +34,9 @@ COPY --from=builder /app/.next/static ./.next/static
# Den fertigen Standalone-Server kopieren
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/supabase ./supabase
COPY --from=builder /app/migrate.js ./migrate.js
# Pass Supabase variables to runtime image
ARG NEXT_PUBLIC_SUPABASE_URL
@@ -45,4 +48,4 @@ EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
CMD ["node", "server.js"]
CMD ["sh", "-c", "node migrate.js && node server.js"]