Skip to content

Commit

Permalink
Fix question history deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnetteeee committed Nov 13, 2024
1 parent 41ab49f commit 6e0c9b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deploy_microservices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "------------------------------------------------------------------------------"

Expand Down
9 changes: 6 additions & 3 deletions peer-prep-user/user-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 . .
Expand Down

0 comments on commit 6e0c9b3

Please sign in to comment.