created an env file to load into context of nodejs when starting server (#13)

Reviewed-on: #13
Co-authored-by: Joseph Nelson <joseph.nelson4456@gmail.com>
Co-committed-by: Joseph Nelson <joseph.nelson4456@gmail.com>
This commit was merged in pull request #13.
This commit is contained in:
2026-05-30 23:09:24 -07:00
committed by joseph.nelson4456
parent b581f76690
commit da57c927ef
2 changed files with 15 additions and 8 deletions
+9 -2
View File
@@ -18,6 +18,13 @@ ENV JWT_SECRET=${JWT_SECRET}
WORKDIR /app
COPY . .
RUN npm install --force
RUN npm install --force --omit=dev && \
echo "DATABASE_URL=${DATABASE_URL}" >> .env && \
echo "DB_HOST=${DB_HOST}" >> .env && \
echo "DB_USERNAME=${DB_USERNAME}" >> .env && \
echo "DB_PASSWORD=${DB_PASSWORD}" >> .env && \
echo "DB_PORT=${DB_PORT}" >> .env && \
echo "DB_DATABASE=${DB_DATABASE}" >> .env && \
echo "JWT_SECRET=${JWT_SECRET}" >> .env && \
CMD ["node", "src/app.js"]
CMD ["node", "--env-file=.env", "src/app.js"]