Skip to content

Commit

Permalink
add infisical to dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Huskydog9988 committed Dec 23, 2023
1 parent 242c995 commit f53babd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
7 changes: 6 additions & 1 deletion packages/database/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]

0 comments on commit f53babd

Please sign in to comment.