Skip to content

Commit

Permalink
Rename email-gateway to brevduen (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikskog authored Mar 18, 2024
1 parent 3bb8961 commit e3d6f06
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 51 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ In Next.js, this is done by adding `transpilePackages` in the `next.config.mjs`
to bundle everything into a single file.

Examples of both can be found in the different applications in the `apps/` directory. For example, `apps/web` uses
Next.js, and `apps/gateway-email` uses TSup.
Next.js, and `apps/brevduen` uses TSup.
</details>

## Tools
Expand Down Expand Up @@ -150,5 +150,5 @@ The following applications run on the following ports:
- `/apps/dashboard`: 3002
- `/apps/rif`: 3003
- `/apps/invoicing`: 3004
- `/apps/gateway-email`: AWS Lambda only
- `/apps/brevduen`: AWS Lambda only
- `/packages/ui`: 61000 (ladle)
4 changes: 2 additions & 2 deletions apps/gateway-email/Dockerfile → apps/brevduen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.json turbo.json ./

RUN npm i -g pnpm@8
RUN pnpm install --frozen-lockfile
RUN pnpm build:gateway-email
RUN pnpm build:brevduen

FROM public.ecr.aws/lambda/nodejs:18 AS runner

WORKDIR ${LAMBDA_TASK_ROOT}

COPY --from=builder /usr/app/apps/gateway-email/dist/* ./
COPY --from=builder /usr/app/apps/brevduen/dist/* ./

CMD ["lambda.handler"]
File renamed without changes.
10 changes: 5 additions & 5 deletions apps/gateway-email/package.json → apps/brevduen/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@dotkomonline/gateway-email",
"name": "@dotkomonline/brevduen",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"docker:dev": "docker run -p 9000:8080 -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION=eu-north-1 gateway-email:latest",
"docker:dev": "docker run -p 9000:8080 -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION=eu-north-1 brevduen:latest",
"build": "tsup src/lambda.ts && echo '{\"type\":\"module\"}' > dist/package.json",
"lint": "biome check . --apply",
"lint-check": "biome check .",
"docker:build": "docker build --platform linux/amd64 -t gateway-email:latest -f Dockerfile ../..",
"docker:push:staging": "docker tag gateway-email:latest 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-staging:latest && docker push 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-staging:latest",
"docker:push:prod": "docker tag gateway-email:latest 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-prod:latest && docker push 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-prod:latest",
"docker:build": "docker build --platform linux/amd64 -t brevduen:latest -f Dockerfile ../..",
"docker:push:staging": "docker tag brevduen:latest 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-staging:latest && docker push 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-staging:latest",
"docker:push:prod": "docker tag brevduen:latest 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-prod:latest && docker push 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-prod:latest",
"lambda:update:staging": "aws lambda update-function-code --function-name brevduen-staging --image-uri 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-staging:latest",
"lambda:update:prod": "aws lambda update-function-code --function-name brevduen-prod --image-uri 891459268445.dkr.ecr.eu-north-1.amazonaws.com/brevduen-prod:latest",
"type-check": "tsc --noEmit"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Gateway Email service is a AWS Lambda handler built in TypeScript that dispatches email through AWS SES. The emails
themselves are designed using https://react.email, and is made available through templates.

[Deployment Source](/infra/web/emails.tf) | [Source Code](/apps/gateway-email/src/lambda.ts)
[Deployment Source](/infra/web/emails.tf) | [Source Code](/apps/brevduen/src/lambda.ts)

## Email Dispatcher

Expand Down
2 changes: 1 addition & 1 deletion docs/infrastructure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Each of our Terraform-managed services are described in detail in their respecti
- Monoweb: [docs/infrastructure/monoweb.md](./monoweb.md)
- Vengeful Vineyard: [docs/infrastructure/vengeful-vineyard.md](./vengeful-vineyard.md)
- Report Interest Form: [docs/infrastructure/rif.md](./rif.md)
- Gateway Email: [docs/infrastructure/gateway-email.md](./gateway-email.md)
- Gateway Email: [docs/infrastructure/brevduen.md](./brevduen.md)
- Gradestats: [docs/infrastructure/gradestats.md](./gradestats.md)
- OnlineWeb4: [docs/infrastructure/onlineweb4.md](./onlineweb4.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/infrastructure/rif.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Report Interest Form Deployment

The Report Interest Form is a simple Next.js application with an API route to submit the form. The API route makes use
of the [gateway-email](./gateway-email.md) service to send an email to notify both the submitter and Bedkom.
of the [brevduen](./brevduen.md) service to send an email to notify both the submitter and Bedkom.

[Source Code](/apps/rif)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:api": "turbo run build --filter=ow-api",
"build:web": "dotenv -e .env -- turbo run build:prod --filter=web",
"build:dashboard": "turbo run build --filter=@dotkomonline/dashboard",
"build:gateway-email": "turbo run build --filter=@dotkomonline/gateway-email",
"build:brevduen": "turbo run build --filter=@dotkomonline/brevduen",
"build:rif": "turbo run build --filter=@dotkomonline/rif",
"build:invoicification": "turbo run build --filter=@dotkomonline/invoicification",
"lint": "turbo run lint",
Expand Down
71 changes: 33 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e3d6f06

Please sign in to comment.