aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile17
1 files changed, 11 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 0966017..d31173b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,17 +1,22 @@
-FROM node:slim
+FROM node:21-slim as base
EXPOSE 3000/tcp
WORKDIR /usr/app
COPY ./ ./
-SHELL ["/bin/bash", "-c"]
-
RUN apt update && \
apt install openssl -y && \
apt clean && \
apt autoclean && \
apt autoremove && \
- npm install --ignore-scripts && \
- npm install -g prisma
+ npm ci --ignore-scripts && \
+ npm install -g prisma && \
+ prisma generate
+
+# env vars needed for build not to fail
+ARG POSTGRES_PRISMA_URL
+ARG POSTGRES_URL_NON_POOLING
+
+RUN npm run build
-ENTRYPOINT ["/bin/bash", "-c", "scripts/image-startup.sh"]
+ENTRYPOINT ["/usr/app/scripts/container-entrypoint.sh"]