-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(env): setup doppler env for api
- Loading branch information
1 parent
608a16d
commit 17afc80
Showing
2 changed files
with
7 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,11 +44,15 @@ RUN npm ci --workspace $WORKSPACE --omit=dev | |
RUN apk add --no-cache libcap; \ | ||
setcap cap_net_bind_service=+ep `readlink -f \`which node\`` | ||
|
||
RUN wget -q -t3 'https://packages.doppler.com/public/cli/rsa.8004D9FF50437357.key' -O /etc/apk/keys/[email protected] && \ | ||
echo 'https://packages.doppler.com/public/cli/alpine/any-version/main' | tee -a /etc/apk/repositories && \ | ||
apk add doppler | ||
|
||
USER $APP_USER | ||
|
||
WORKDIR /app/$WORKSPACE | ||
|
||
CMD ["node", "dist/server.js"] | ||
CMD ["doppler", "run", "--", "node", "dist/server.js"] | ||
|
||
FROM production AS production-nginx | ||
|
||
|
@@ -62,4 +66,4 @@ RUN apk add --no-cache libcap nginx openssl \ | |
|
||
COPY $WORKSPACE/nginx.conf /etc/nginx/nginx.conf | ||
|
||
CMD sed -i "s/127.0.0.1/$(hostname -i)/" /etc/nginx/nginx.conf && sed -i "s/:3000/:$PORT/" /etc/nginx/nginx.conf && nginx && node dist/server.js | ||
CMD sed -i "s/127.0.0.1/$(hostname -i)/" /etc/nginx/nginx.conf && sed -i "s/:3000/:$PORT/" /etc/nginx/nginx.conf && nginx && doppler run -- node dist/server.js |