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:
+9
-2
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user