Skip to content

Commit

Permalink
feat(embed): add sentry dsn in the lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
tericcabrel committed Sep 13, 2022
1 parent 79b153e commit ce25084
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy-code-embed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
EMBED_STYLE_URL: ${{ secrets.EMBED_STYLE_URL }}
EMBED_JS_URL: ${{ secrets.EMBED_JS_URL }}
WEB_APP_URL: ${{ secrets.WEB_APP_URL }}
ENV: ${{ secrets.ENV }}
SENTRY_DSN: ${{ secrets.CODE_EMBED_SENTRY_DSN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions apps/functions/code-embed/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ DATABASE_URL="mysql:https://root:@127.0.0.1:3311/sharingan"
EMBED_STYLE_URL=https://cdn.jsdelivr.net/npm/sharingan-embed@latest/style.min.css
EMBED_JS_URL=https://cdn.jsdelivr.net/npm/sharingan-embed@latest/script.min.js
WEB_APP_URL=http:https://localhost:7500
ENV=development
SENTRY_DSN=
7 changes: 5 additions & 2 deletions apps/functions/code-embed/serverless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { AWS } from '@serverless/typescript';
import renderer from '@/functions/renderer';

const serverlessConfiguration: AWS = {
configValidationMode: 'error',
custom: {
esbuild: {
bundle: true,
Expand Down Expand Up @@ -40,11 +41,13 @@ const serverlessConfiguration: AWS = {
DATABASE_URL: '${env:DATABASE_URL}',
EMBED_JS_URL: '${env:EMBED_JS_URL}',
EMBED_STYLE_URL: '${env:EMBED_STYLE_URL}',
NODE_OPTIONS: '--enable-source-maps --stack-trace-limit=1000',
ENV: '${env:ENV}',
NODE_OPTIONS: '--stack-trace-limit=1000',
SENTRY_DSN: '${env:SENTRY_DSN}',
WEB_APP_URL: '${env:WEB_APP_URL}',
},
name: 'aws',
region: 'eu-west-2',
region: 'eu-west-1',
runtime: 'nodejs16.x',
},
service: 'code-embed',
Expand Down

0 comments on commit ce25084

Please sign in to comment.