Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(env): setup doppler env for api #364

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading