Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deploy): update task defs for prod + staging #1137

Merged
merged 53 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
8fb18a3
fix(deploy-staging): update workflow
seaerchin Dec 28, 2023
48a1741
fix(task-def): update
seaerchin Dec 28, 2023
c776282
fix(dpeloy_staging): update
seaerchin Dec 28, 2023
d11a087
fix(apsppec): add codeploy stuff
seaerchin Dec 28, 2023
992a592
fix(task-def): update
seaerchin Dec 28, 2023
ba8e989
fix(task-definition): update volumes path
seaerchin Jan 18, 2024
ade9e91
fix(package): update env var injection
seaerchin Jan 18, 2024
0e5cb66
fix(task-def): add missing env vars
seaerchin Jan 19, 2024
c9282d8
empty
seaerchin Jan 19, 2024
846117c
fix(ecs): chnage log group
seaerchin Jan 22, 2024
e556dab
fix(tsk-def): add missing vars
seaerchin Jan 23, 2024
42b927e
fix(scripts): update env var injetdion
seaerchin Jan 25, 2024
00776a5
fix(dockerfile): update dockerfile
seaerchin Jan 25, 2024
0244bf5
docs(unliknedpageservice): add a comment to avoid confusing ppl
seaerchin Jan 25, 2024
74bd85e
fix(task-def): update prod values
seaerchin Jan 25, 2024
9a0ebdc
Merge branch 'develop' into feat/ecs
seaerchin Jan 25, 2024
5d61efa
Merge branch 'develop' into feat/ecs
seaerchin Jan 25, 2024
48c1f05
fix(dockerfile): update key injection
seaerchin Jan 26, 2024
d8ec4f5
feat(task-def): add env vars
seaerchin Jan 26, 2024
608d6fa
fix(env): update env type injection
seaerchin Jan 26, 2024
ca290ed
feat(task-def): enable init process
seaerchin Jan 26, 2024
06566bc
fix(task-def): update env vars
seaerchin Jan 26, 2024
4ac3488
refactor(workflows): update ci + staging
seaerchin Jan 30, 2024
9bbeb9d
feat(env): add workflow + env vasr
seaerchin Jan 30, 2024
f7fd4ec
build(env-vars): add secrets
seaerchin Jan 30, 2024
174628f
fix(task-def): remove comments
seaerchin Jan 30, 2024
bb808e6
fix(task-def): update log groups + env vasr
seaerchin Jan 30, 2024
91f235a
fix(config): update dd env var to allow vapt value
seaerchin Jan 30, 2024
f7fb946
fix(config): add shortenv
seaerchin Jan 30, 2024
6cbeb6f
fix(task-def): update log group
seaerchin Jan 30, 2024
2d60ad7
fix(task-def): amend log group for vapt
seaerchin Jan 30, 2024
f3a81ae
feat(vapt-task-def): add env vars
seaerchin Jan 30, 2024
322b115
fix(task-def): update dd env
seaerchin Jan 30, 2024
f76cb08
feat(task-def): add docker labels
seaerchin Jan 30, 2024
cc35bfb
fix(task-def): update env vars for task def
seaerchin Jan 31, 2024
4bed5ca
fix(dockerfile): set git profile
seaerchin Jan 31, 2024
b559f11
feat(vapt): add ssh key for vapt
seaerchin Jan 31, 2024
ceaaf1d
fix(task-def): update task def for vapt site creation form
seaerchin Feb 1, 2024
e4ba82f
feat(email): add iac email router
seaerchin Feb 1, 2024
139c87d
fix(task-def): update task role
seaerchin Feb 1, 2024
5bc20c3
fix(server): middlewareorder
seaerchin Feb 1, 2024
940e8f3
fix(minor-fixes): fix header + vapt workflow name
seaerchin Feb 1, 2024
c7dedc8
fix(email): fix for missing creatorid
seaerchin Feb 2, 2024
ba4d95f
fix(vapt): update task def
seaerchin Feb 2, 2024
8d75c8f
fix(task-def): update for staging n prod
seaerchin Feb 2, 2024
031d1ae
fix(deployvapt): remove deploy from staging
seaerchin Feb 4, 2024
94894c7
fix(usersservice): add phone # if email ends with cure53.de
seaerchin Feb 5, 2024
37bea85
feat(vapt): add volt.cure53.de
seaerchin Feb 13, 2024
1a296e6
refactor(iac): remove rourtes
seaerchin Feb 15, 2024
0ff5467
fix(task-def): remove env from vapt
seaerchin Feb 15, 2024
6e1d87a
Merge branch 'develop' into feat/vapt
seaerchin Feb 15, 2024
686a61e
fix(vapt): delete vapt related stuff for ez merge
seaerchin Feb 19, 2024
407905e
fix(pasckage): remove vapt related commands
seaerchin Feb 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2,7 +2,7 @@

convict.addFormat({
name: "required-string",
validate: (val: any) => {

Check warning on line 5 in src/config/config.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
if (!val) throw new Error("value cannot be empty, null or undefined")
if (typeof val !== "string") throw new Error("value must be a string")
},
Expand All @@ -10,14 +10,14 @@

convict.addFormat({
name: "required-positive-number",
validate: (val: any) => {

Check warning on line 13 in src/config/config.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
if (val === null || val === undefined || val === "")
throw new Error("value cannot be empty, null or undefined")
if (typeof val !== "number") throw new Error("value must be a number")
},
coerce: (val: string) => {
const coercedVal = Number(val)
if (isNaN(coercedVal)) {

Check warning on line 20 in src/config/config.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected use of 'isNaN'. Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan
throw new Error(
"value provided is not a positive number. please provide a valid positive number"
)
Expand All @@ -31,7 +31,7 @@

convict.addFormat({
name: "required-boolean",
validate: (val: any) => {

Check warning on line 34 in src/config/config.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
if (val === null || val === undefined)
throw new Error("value cannot be empty, null or undefined")
if (typeof val !== "boolean") throw new Error("value must be a boolean")
Expand Down Expand Up @@ -258,7 +258,17 @@
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
Loading