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.
1 parent 83e2b2c commit 35e606bCopy full SHA for 35e606b
apps/cms/Dockerfile
@@ -55,4 +55,12 @@ RUN mkdir -p /app/apps/cms/uploads
55
EXPOSE 3001
56
ENV NODE_ENV=production
57
ENV PORT=3001
58
-CMD ["pnpm", "--filter=cms", "start"]
+
59
+# Create a startup script that runs migrations then starts the app
60
+RUN echo '#!/bin/sh\n\
61
+echo "Running database migrations..."\n\
62
+pnpm --filter=cms payload migrate\n\
63
+echo "Starting CMS application..."\n\
64
+pnpm --filter=cms start' > /app/start.sh && chmod +x /app/start.sh
65
66
+CMD ["/app/start.sh"]
0 commit comments