Skip to content

Commit

Permalink
ci: add target to docker secret mount
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokamoto committed May 26, 2024
1 parent 8d45cfa commit 0d1162e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ ENV NEXT_PUBLIC_CLERK_SIGN_UP_URL=/join
ENV NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
ENV NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/

RUN --mount=type=secret,id=DATABASE_URL DATABASE_URL=$(cat /run/secrets/DATABASE_URL) \
--mount=type=secret,id=REDIS_URI REDIS_URI=$(cat /run/secrets/REDIS_URI) \
--mount=type=secret,id=NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=$(cat /run/secrets/NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY) \
--mount=type=secret,id=NEXT_PUBLIC_DRIVE_LINK NEXT_PUBLIC_DRIVE_LINK=$(cat /run/secrets/NEXT_PUBLIC_DRIVE_LINK) \
RUN --mount=type=secret,id=DATABASE_URL,target=/run/secrets/DATABASE_URL \
DATABASE_URL=$(cat /run/secrets/DATABASE_URL) \
--mount=type=secret,id=REDIS_URI,target=/run/secrets/REDIS_URI \
REDIS_URI=$(cat /run/secrets/REDIS_URI) \
--mount=type=secret,id=NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY,target=/run/secrets/NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY \
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=$(cat /run/secrets/NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY) \
--mount=type=secret,id=NEXT_PUBLIC_DRIVE_LINK,target=/run/secrets/NEXT_PUBLIC_DRIVE_LINK \
NEXT_PUBLIC_DRIVE_LINK=$(cat /run/secrets/NEXT_PUBLIC_DRIVE_LINK) \
pnpm run build

# Final deployment image
Expand Down

0 comments on commit 0d1162e

Please sign in to comment.