Skip to content

Commit

Permalink
feat(deploy): update task defs for prod + staging (#1137)
Browse files Browse the repository at this point in the history
* fix(deploy-staging): update workflow

* fix(task-def): update

* fix(dpeloy_staging): update

* fix(apsppec): add codeploy stuff

* fix(task-def): update

* fix(task-definition): update volumes path

* fix(package): update env var injection

* fix(task-def): add missing env vars

* empty

* fix(ecs): chnage log group

* fix(tsk-def): add missing vars

* fix(scripts): update env var injetdion

* fix(dockerfile): update dockerfile

* docs(unliknedpageservice): add a comment to avoid confusing ppl

* fix(task-def): update prod values

* fix(dockerfile): update key injection

* feat(task-def): add env vars

* fix(env): update env type injection

* feat(task-def): enable init process

* fix(task-def): update env vars

* refactor(workflows): update ci + staging

* feat(env): add workflow + env vasr

* build(env-vars): add secrets

* fix(task-def): remove comments

* fix(task-def): update log groups + env vasr

* fix(config): update dd env var to allow vapt value

* fix(config): add shortenv

* fix(task-def): update log group

* fix(task-def): amend log group for vapt

* feat(vapt-task-def): add env vars

* fix(task-def): update dd env

* feat(task-def): add docker labels

* fix(task-def): update env vars for task def

* fix(dockerfile): set git profile

* feat(vapt): add ssh key for vapt

* fix(task-def): update task def for vapt site creation form

* feat(email): add iac email router

* fix(task-def): update task role

* fix(server): middlewareorder

* fix(minor-fixes): fix header + vapt workflow name

* fix(email): fix for missing creatorid

* fix(vapt): update task def

* fix(task-def): update for staging n prod

* fix(deployvapt): remove deploy from staging

* fix(usersservice): add phone # if email ends with cure53.de

* feat(vapt): add volt.cure53.de

* refactor(iac): remove rourtes

* fix(task-def): remove env from vapt

* fix(vapt): delete vapt related stuff for ez merge

* fix(pasckage): remove vapt related commands
  • Loading branch information
seaerchin authored Feb 19, 2024
1 parent 763aca9 commit 671f75d
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .aws/deploy/backend-task-definition.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@
"value": "<DD_API_KEY>"
}
],
"dockerLabels": {
"com.datadoghq.tags.env": "prod",
"com.datadoghq.tags.service": "isomer",
"com.datadoghq.tags.version": "7"
},
"mountPoints": [],
"volumesFrom": [],
"secrets": [],
Expand Down
7 changes: 6 additions & 1 deletion .aws/deploy/backend-task-definition.staging.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
},
{
"name": "DD_ENV",
"value": "prod"
"value": "staging"
},
{
"name": "DD_SERVICE",
Expand All @@ -250,6 +250,11 @@
"value": "<DD_API_KEY>"
}
],
"dockerLabels": {
"com.datadoghq.tags.env": "staging",
"com.datadoghq.tags.service": "isomer",
"com.datadoghq.tags.version": "7"
},
"mountPoints": [],
"volumesFrom": [],
"secrets": [],
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [email protected]" >> /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"]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@
"engines": {
"node": ">=16.0.0"
}
}
}
12 changes: 11 additions & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
1 change: 1 addition & 0 deletions src/services/identity/SitesService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ class SitesService {
createParams: Partial<Site> & {
name: Site["name"]
creator: Site["creator"]
creatorId: Site["creatorId"]
}
) {
return this.siteRepository.create(createParams)
Expand Down
1 change: 1 addition & 0 deletions src/services/identity/UsersService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ class UsersService {
transaction,
})
user.lastLoggedIn = new Date()

return user.save({ transaction })
})
}
Expand Down

0 comments on commit 671f75d

Please sign in to comment.