Skip to content

Commit

Permalink
more infra shenanigans, do not mind me
Browse files Browse the repository at this point in the history
  • Loading branch information
geclos committed Sep 14, 2024
1 parent cc62f61 commit de17186
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ on:
- 'apps/infra/src/deployments/web.ts'
- 'apps/infra/src/deployments/shared.ts'
- 'packages/**'
secrets:
SENTRY_ORG:
required: true
SENTRY_PROJECT:
required: true
SENTRY_DSN:
required: true

jobs:
deploy:
Expand Down
7 changes: 4 additions & 3 deletions apps/infra/src/deployments/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ const dbPassword = getSecretString(dbPasswordSecretId)
const mailerApiKey = getSecretString(mailerApiKeyArn)
const awsAccessKey = getSecretString(awsAccessKeyArn)
const awsAccessSecret = getSecretString(awsAccessSecretArn)
const sentryDsn = getSecretString(sentryDsnArn)
const sentryOrg = getSecretString(sentryOrgArn)
const sentryProject = getSecretString(sentryProjectArn)

export const sentryDsn = getSecretString(sentryDsnArn)
export const sentryOrg = getSecretString(sentryOrgArn)
export const sentryProject = getSecretString(sentryProjectArn)

export const dbUrl = pulumi.interpolate`postgresql://${dbUsername}:${dbPassword}@${dbEndpoint}/${dbName}?sslmode=verify-full&sslrootcert=/app/packages/core/src/assets/eu-central-1-bundle.pem`
export const environment = pulumi
Expand Down
13 changes: 12 additions & 1 deletion apps/infra/src/deployments/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ import {
resolve,
vpcId,
} from '../shared'
import { coreStack, environment } from './shared'
import {
coreStack,
environment,
sentryDsn,
sentryOrg,
sentryProject,
} from './shared'

const DNS_ADDRESS = 'app.latitude.so'

Expand All @@ -25,6 +31,11 @@ const image = new docker.Image('LatitudeLLMAppImage', {
platform: 'linux/amd64',
context: resolve('../../../'),
dockerfile: resolve('../../../apps/web/docker/Dockerfile'),
args: {
SENTRY_DSN: sentryDsn,
SENTRY_ORG: sentryOrg,
SENTRY_PROJECT: sentryProject,
},
},
imageName: pulumi.interpolate`${repo.repositoryUrl}:latest`,
registry: {
Expand Down

0 comments on commit de17186

Please sign in to comment.