Skip to content

Scheduling infrastructure for absolutely everyone.

Update api image Dockerfile (#13890)

David Somers5b733765f4c0
diff --git a/infra/docker/api/Dockerfile b/infra/docker/api/Dockerfile
index 404662c9fd4..a9502dd77df 100644
--- a/infra/docker/api/Dockerfile
+++ b/infra/docker/api/Dockerfile
@@ -4,12 +4,15 @@
ARG NODE_VERSION=20.7.0
FROM node:${NODE_VERSION}-slim as base
+ARG DATABASE_URL
+
# Next.js/Prisma app lives here
WORKDIR /app
# Set production environment
-ENV NODE_ENV="production"
-
+ENV NODE_ENV="production" \
+ DATABASE_URL=$DATABASE_URL \
+ DATABASE_DIRECT_URL=$DATABASE_URL
# Throw-away build stage to reduce size of final image
FROM base as build
@@ -21,6 +24,7 @@ COPY ./apps/api ./apps/api
COPY ./packages ./packages
# TODO: follow up pr to remove dependencies on web
COPY ./apps/web ./apps/web
+COPY ./tests ./tests
# Install node modules and dependencies, prune unneeded deps, then build
RUN set -eux; \
@@ -66,4 +70,4 @@ COPY --from=build /app/apps/web/package.json ./apps/web/package.json
EXPOSE 80
# Start cmd, called when docker image is mounted
-CMD [ "yarn", "workspace", "@calcom/api", "docker-start-api"]
\ No newline at end of file
+CMD [ "yarn", "workspace", "@calcom/api", "docker-start-api"]