-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41ab49f
commit 6e0c9b3
Showing
2 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ gcloud run deploy peer-prep-user \ | |
--image gcr.io/g01-peer-prep/peer-prep-user:latest \ | ||
--region asia-southeast1 \ | ||
--allow-unauthenticated \ | ||
--set-env-vars "ENV=PROD,DB_CLOUD_URI=mongodb+srv://peer-prep:[email protected]/?retryWrites=true&w=majority&appName=peer-prep-cluster0,JWT_SECRET=you-can-replace-this-with-your-own-secret" | ||
--set-env-vars "ENV=PROD,DB_CLOUD_URI=mongodb+srv://peer-prep:[email protected]/?retryWrites=true&w=majority&appName=peer-prep-cluster0,JWT_SECRET=you-can-replace-this-with-your-own-secret, TZ=Asia/Kuala_Lumpur" | ||
echo "peer-prep-user deployed successfully." | ||
echo "------------------------------------------------------------------------------" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,20 @@ | |
FROM node:18-alpine | ||
|
||
ENV ENV=PROD | ||
|
||
ENV DB_CLOUD_URI=mongodb+srv://peer-prep:[email protected]/?retryWrites=true&w=majority&appName=peer-prep-cluster0 | ||
ENV TZ=Asia/Kuala_Lumpur | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json (if available) | ||
COPY package*.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install | ||
# Install dependencies and set timezone | ||
RUN apk add --no-cache tzdata \ | ||
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ | ||
&& echo $TZ > /etc/timezone \ | ||
&& npm install | ||
|
||
# Copy the rest of the application code | ||
COPY . . | ||
|