diff --git a/deploy_microservices.sh b/deploy_microservices.sh index d73d065323..49535115ea 100755 --- a/deploy_microservices.sh +++ b/deploy_microservices.sh @@ -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:1EjJPR5eiyIwhIql@peer-prep-cluster0.ftsoh.mongodb.net/?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:1EjJPR5eiyIwhIql@peer-prep-cluster0.ftsoh.mongodb.net/?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 "------------------------------------------------------------------------------" diff --git a/peer-prep-user/user-service/Dockerfile b/peer-prep-user/user-service/Dockerfile index ff6c4d99f5..94ee392fda 100644 --- a/peer-prep-user/user-service/Dockerfile +++ b/peer-prep-user/user-service/Dockerfile @@ -2,8 +2,8 @@ FROM node:18-alpine ENV ENV=PROD - ENV DB_CLOUD_URI=mongodb+srv://peer-prep:1EjJPR5eiyIwhIql@peer-prep-cluster0.ftsoh.mongodb.net/?retryWrites=true&w=majority&appName=peer-prep-cluster0 +ENV TZ=Asia/Kuala_Lumpur # Set the working directory WORKDIR /app @@ -11,8 +11,11 @@ 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 . .