Skip to content

Commit

Permalink
Infra cleanup after experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
NiallJoeMaher authored Nov 18, 2023
1 parent c5f85c5 commit da46d12
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ ENV NEXT_PUBLIC_SENTRY_DSN https://a0460f6abac067ae72754b23ccd03aac@o45058956182

RUN npx prisma generate

RUN --mount=type=secret,id=TEST_VALUE export TEST_VALUE=$(cat /run/secrets/TEST_VALUE) && \
echo $TEST_VALUE

RUN --mount=type=secret,id=SECRET_TIME export SECRET_TIME=$(cat /run/secrets/SECRET_TIME) && \
echo $SECRET_TIME

RUN --mount=type=secret,id=DATABASE_URL export DATABASE_URL=$(cat /run/secrets/DATABASE_URL) && \
RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN export SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) && \
npm run build

# Production image, copy all the files and run next
Expand Down
4 changes: 1 addition & 3 deletions cdk/lib/app-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export class AppStack extends cdk.Stack {
directory: "../",
file: "Dockerfile",
buildSecrets: {
DATABASE_URL: "type=env",
TEST_VALUE: "type=env",
SECRET_TIME: "type=env",
SENTRY_AUTH_TOKEN: "type=env",
},
buildArgs: {
DOCKER_BUILDKIT: "1",
Expand Down
12 changes: 2 additions & 10 deletions cdk/lib/pipeline-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,9 @@ export class PipelineStack extends cdk.Stack {
codeBuildDefaults: {
buildEnvironment: {
environmentVariables: {
DATABASE_URL: {
SENTRY_AUTH_TOKEN: {
type: BuildEnvironmentVariableType.PARAMETER_STORE,
value: "/prod/db/url",
},
TEST_VALUE: {
type: BuildEnvironmentVariableType.PLAINTEXT,
value: "TESTING MY PATIENCE",
},
SECRET_TIME: {
type: BuildEnvironmentVariableType.PARAMETER_STORE,
value: "/prod/temp/test",
value: "sentry",
},
},
},
Expand Down

0 comments on commit da46d12

Please sign in to comment.