From f53babdc231e9ab1a96077c95043c74b6c251858 Mon Sep 17 00:00:00 2001 From: Huskydog9988 <39809509+Huskydog9988@users.noreply.github.com> Date: Sat, 23 Dec 2023 13:16:55 -0500 Subject: [PATCH] add infisical to dockerfiles --- apps/web/Dockerfile | 7 ++++++- packages/database/Dockerfile | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 226216fc..c990bcdd 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -50,6 +50,11 @@ WORKDIR /app ENV NODE_ENV production ENV NEXT_TELEMETRY_DISABLED 1 +# Install infisical +RUN apk add --no-cache bash curl && curl -1sLf \ +'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \ +&& apk add infisical + # Don't run production as root RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs @@ -64,4 +69,4 @@ COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./ COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public -CMD node apps/web/server.js +CMD ["infisical", "run", "--", "node", "apps/web/server.js"] diff --git a/packages/database/Dockerfile b/packages/database/Dockerfile index fbc268e5..8810bf59 100644 --- a/packages/database/Dockerfile +++ b/packages/database/Dockerfile @@ -17,6 +17,11 @@ FROM node:18-alpine3.17 AS runner WORKDIR /app ENV NODE_ENV production +# Install infisical +RUN apk add --no-cache bash curl && curl -1sLf \ +'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \ +&& apk add infisical + # Copy node_modules from installer to runner COPY .yarn/releases .yarn/releases COPY .yarnrc.yml .yarnrc.yml @@ -28,4 +33,4 @@ COPY --from=builder /app/out/full/ . ENV Mode migrate -ENTRYPOINT ["sh", "./packages/database/entrypoint.sh"] +ENTRYPOINT ["infisical", "run", "--", "sh", "./packages/database/entrypoint.sh"]