From 9e432d68aabff7351cf3aebc65dca8b2a375f088 Mon Sep 17 00:00:00 2001 From: Sanjay Soundarajan Date: Fri, 15 Nov 2024 15:18:48 -0800 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=91=B7=20ci:=20try=20app=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/Dockerfile b/ui/Dockerfile index 78843a2..64576a3 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -43,6 +43,10 @@ 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\nyarn prisma:migrate deploy\nexec node /app/server/index.mjs' > /app/start.sh && \ + chmod +x /app/start.sh + EXPOSE 3000 -CMD ["node", "/app/server/index.mjs"] \ No newline at end of file +CMD ["/app/start.sh"] \ No newline at end of file From 737caa2fe13bb6037852aaf8551df5ba09fffd46 Mon Sep 17 00:00:00 2001 From: Sanjay Soundarajan Date: Fri, 15 Nov 2024 15:19:42 -0800 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=91=B7=20ci:=20try=20app=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/Dockerfile b/ui/Dockerfile index 64576a3..f9158fc 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -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 \ From a7b532324b2c9657052969f687da72d25cd03176 Mon Sep 17 00:00:00 2001 From: Sanjay Soundarajan Date: Fri, 15 Nov 2024 15:23:52 -0800 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=91=B7=20ci:=20try=20app=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/Dockerfile b/ui/Dockerfile index f9158fc..84ac75a 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -43,9 +43,9 @@ 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\nyarn prisma:migrate deploy\nexec node /app/server/index.mjs' > /app/start.sh && \ +RUN echo '#!/bin/sh\nyarn prisma:migrate deploy\nexec node /app/server/index.mjs' > /start.sh && \ chmod +x /app/start.sh EXPOSE 3000 -CMD ["/app/start.sh"] \ No newline at end of file +CMD ["/start.sh"] \ No newline at end of file From da7f50266035aba9bbc84fd92d6e0c3b54e03159 Mon Sep 17 00:00:00 2001 From: Sanjay Soundarajan Date: Fri, 15 Nov 2024 15:26:19 -0800 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=91=B7=20ci:=20try=20app=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/Dockerfile b/ui/Dockerfile index 84ac75a..aa08115 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -43,7 +43,7 @@ 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\nyarn prisma:migrate deploy\nexec node /app/server/index.mjs' > /start.sh && \ +RUN echo '#!/bin/sh\nyarn prisma:migrate deploy\nexec node /app/server/index.mjs' > /app/start.sh && \ chmod +x /app/start.sh EXPOSE 3000 From dbf093539c9b8493b48f9ef503605faa5e5eaea7 Mon Sep 17 00:00:00 2001 From: Sanjay Soundarajan Date: Fri, 15 Nov 2024 15:31:50 -0800 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=91=B7=20ci:=20try=20app=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/Dockerfile b/ui/Dockerfile index aa08115..d63e83e 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -43,9 +43,11 @@ 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\nyarn prisma:migrate deploy\nexec node /app/server/index.mjs' > /app/start.sh && \ +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 ["/start.sh"] \ No newline at end of file +CMD ["/bin/sh", "/app/start.sh"] \ No newline at end of file From 158bfb18db067030598f416b231aee53b27045e5 Mon Sep 17 00:00:00 2001 From: Sanjay Soundarajan Date: Fri, 15 Nov 2024 15:35:49 -0800 Subject: [PATCH 6/7] =?UTF-8?q?=F0=9F=91=B7=20ci:=20try=20app=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/Dockerfile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ui/Dockerfile b/ui/Dockerfile index d63e83e..8f43c49 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -13,15 +13,9 @@ ARG DATABASE_URL COPY package.json yarn.lock ./ COPY prisma ./prisma/ -# Install dependencies and generate prisma client -RUN yarn install --frozen-lockfile -RUN yarn prisma:generate -RUN yarn cache clean - -# RUN yarn install --frozen-lockfile --production \ -# && yarn prisma:generate \ -# && yarn prisma:migrate:deploy \ -# && yarn cache clean +RUN yarn install --frozen-lockfile --production \ + && yarn prisma:generate \ + && yarn cache clean # Copy source files and build COPY . . From 4e05f51234ae635d233913324590c6db15d550ef Mon Sep 17 00:00:00 2001 From: Sanjay Soundarajan Date: Fri, 15 Nov 2024 15:39:55 -0800 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=91=B7=20ci:=20try=20app=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/Dockerfile b/ui/Dockerfile index 8f43c49..50921cd 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -13,7 +13,7 @@ ARG DATABASE_URL COPY package.json yarn.lock ./ COPY prisma ./prisma/ -RUN yarn install --frozen-lockfile --production \ +RUN yarn install --frozen-lockfile \ && yarn prisma:generate \ && yarn cache clean