Skip to content

Commit

Permalink
fix(deploy): set env var in build to enable prerender
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-sanna-eki committed Dec 19, 2023
1 parent 1549b4b commit 7ffc05c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ FROM node:18-slim
# Set the working directory
WORKDIR /usr/src/app

# Declare build-time arguments for database configuration
ARG DB_HOST
ARG DB_PORT
ARG DB_DATABASE
ARG DB_USER
ARG DB_PASSWORD

# Set the environment variables from build arguments
ENV DB_HOST=${DB_HOST}
ENV DB_PORT=${DB_PORT}
ENV DB_DATABASE=${DB_DATABASE}
ENV DB_USER=${DB_USER}
ENV DB_PASSWORD=${DB_PASSWORD}

# Copy package.json and package-lock.json
COPY package*.json ./

Expand Down

0 comments on commit 7ffc05c

Please sign in to comment.