diff --git a/.aws/deploy/backend-task-definition.prod.json b/.aws/deploy/backend-task-definition.prod.json index 3be62b171..cecbdcc55 100644 --- a/.aws/deploy/backend-task-definition.prod.json +++ b/.aws/deploy/backend-task-definition.prod.json @@ -241,6 +241,11 @@ "value": "" } ], + "dockerLabels": { + "com.datadoghq.tags.env": "prod", + "com.datadoghq.tags.service": "isomer", + "com.datadoghq.tags.version": "7" + }, "mountPoints": [], "volumesFrom": [], "secrets": [], diff --git a/.aws/deploy/backend-task-definition.staging.json b/.aws/deploy/backend-task-definition.staging.json index b58fc2b05..030f68e41 100644 --- a/.aws/deploy/backend-task-definition.staging.json +++ b/.aws/deploy/backend-task-definition.staging.json @@ -223,7 +223,7 @@ }, { "name": "DD_ENV", - "value": "prod" + "value": "staging" }, { "name": "DD_SERVICE", @@ -250,6 +250,11 @@ "value": "" } ], + "dockerLabels": { + "com.datadoghq.tags.env": "staging", + "com.datadoghq.tags.service": "isomer", + "com.datadoghq.tags.version": "7" + }, "mountPoints": [], "volumesFrom": [], "secrets": [], diff --git a/Dockerfile b/Dockerfile index 940385586..2da4bd204 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,10 @@ RUN npm ci RUN rm -rf /var/cache/apk/* RUN git config --system --add safe.directory '*' +RUN echo "[user]" > /root/.gitconfig +RUN echo " name = Isomer Admin" >> /root/.gitconfig +RUN echo " email = admin@isomer.gov.sg" >> /root/.gitconfig + EXPOSE "8081" CMD ["bash", "-c", "chmod +x ./scripts/02_fetch_ssh_keys.sh && bash ./scripts/02_fetch_ssh_keys.sh & npm run start:ecs"] diff --git a/package.json b/package.json index ccb79c8de..9c1cfeb3e 100644 --- a/package.json +++ b/package.json @@ -174,4 +174,4 @@ "engines": { "node": ">=16.0.0" } -} +} \ No newline at end of file diff --git a/src/config/config.ts b/src/config/config.ts index 4cd28e1b0..7d8f91c84 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -258,7 +258,17 @@ const config = convict({ dataDog: { env: { doc: "The DataDog environment", - format: ["development", "local", "staging", "production"], + format: [ + "development", + "local", + "staging", + "vapt", + "uat", + "production", + "prod", + "stg", + "dev", + ], env: "DD_ENV", default: "local", }, diff --git a/src/services/identity/SitesService.ts b/src/services/identity/SitesService.ts index 094fb3727..2ee7322a6 100644 --- a/src/services/identity/SitesService.ts +++ b/src/services/identity/SitesService.ts @@ -442,6 +442,7 @@ class SitesService { createParams: Partial & { name: Site["name"] creator: Site["creator"] + creatorId: Site["creatorId"] } ) { return this.siteRepository.create(createParams) diff --git a/src/services/identity/UsersService.ts b/src/services/identity/UsersService.ts index c7e9685bb..228f46f40 100644 --- a/src/services/identity/UsersService.ts +++ b/src/services/identity/UsersService.ts @@ -161,6 +161,7 @@ class UsersService { transaction, }) user.lastLoggedIn = new Date() + return user.save({ transaction }) }) }