Skip to content

Commit

Permalink
feat(env): setup doppler env for api
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev committed Oct 4, 2024
1 parent 608a16d commit 17afc80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
13 changes: 1 addition & 12 deletions apps/api/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,8 @@ services:
image: <IMAGE_NAME>:<IMAGE_TAG>
depends-on: cloud-sql-proxy
env:
- GITHUB_PAT=
- AKASH_SANDBOX_DATABASE_CS=
- USER_DATABASE_CS=
- SECRET_TOKEN=
- NETWORK=<sandbox|mainnet>
- MASTER_WALLET_MNEMONIC=
- POSTGRES_DB_URI=
- ANONYMOUS_USER_TOKEN_SECRET=
- SENTRY_DSN=
- DOPPLER_TOKEN=
- SENTRY_SERVER_NAME=
- DEPLOYMENT_ENV=<staging|production>
- STRIPE_SECRET_KEY=
- STRIPE_WEBHOOK_SECRET=
expose:
- port: 3080
as: 80
Expand Down
8 changes: 6 additions & 2 deletions docker/Dockerfile.node
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit 17afc80

Please sign in to comment.