Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 ci: fix staging deploys #104

Merged
merged 7 commits into from
Nov 15, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ COPY prisma ./prisma/
# Install dependencies and generate prisma client
RUN yarn install --frozen-lockfile
RUN yarn prisma:generate
RUN yarn prisma:migrate:deploy
RUN yarn cache clean

# RUN yarn install --frozen-lockfile --production \
Expand All @@ -43,6 +42,12 @@ COPY --from=builder /app/.output ./
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
COPY --from=builder /app/node_modules/@prisma ./node_modules/@prisma

# Create startup script that runs migrations before starting the app
RUN echo '#!/bin/sh' > /app/start.sh && \
echo 'yarn prisma:migrate deploy' >> /app/start.sh && \
echo 'exec node /app/server/index.mjs' >> /app/start.sh && \
chmod +x /app/start.sh

EXPOSE 3000

CMD ["node", "/app/server/index.mjs"]
CMD ["/bin/sh", "/app/start.sh"]
Loading