Skip to content

Commit

Permalink
inject .env file on Render builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bgentry committed May 6, 2024
1 parent 5298978 commit af551bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ COPY ui/package.json ui/package-lock.json ./
RUN npm install
ENV NODE_ENV=production
COPY ui/ .
RUN npm run build
# TODO: this is a Render-specific build-time env var hack and isn't suitable for
# a published Dockerfile:
RUN --mount=type=secret,id=_env,dst=/etc/secrets/.env cat /etc/secrets/.env
RUN --mount=type=secret,id=_env,dst=/etc/secrets/.env \
npm run build

# Build the Go binary, including embedded UI files:
FROM golang:1.22.2-alpine AS build-go
Expand Down

0 comments on commit af551bb

Please sign in to comment.