Skip to content

Commit

Permalink
feat(config): setup doppler env for api
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev committed Oct 9, 2024
1 parent dacf32a commit ed22ad7
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 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
1 change: 1 addition & 0 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"lint": "eslint .",
"migrate": "node-pg-migrate",
"migration:gen": "drizzle-kit generate",
"prod": "doppler run -- node dist/server.js",
"start": "webpack --config webpack.dev.js --watch",
"test": "jest --selectProjects unit functional",
"test:cov": "jest --selectProjects unit functional --coverage",
Expand Down
1 change: 1 addition & 0 deletions apps/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"dev": "npm run start",
"format": "prettier --write ./*.{js,json} **/*.{ts,js,json}",
"lint": "eslint .",
"prod": "node dist/server.js",
"start": "webpack --mode development --config webpack.dev.js --watch",
"test": "jest"
},
Expand Down
1 change: 1 addition & 0 deletions apps/stats-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@akashnetwork/network-store": "*",
"@akashnetwork/ui": "*",
"@akashnetwork/network-store": "*",
"@cosmjs/encoding": "^0.32.4",
"@json2csv/plainjs": "^7.0.4",
"@nivo/line": "^0.87.0",
Expand Down
Empty file.
Empty file.
Empty file.
11 changes: 9 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 ["npm", "run", "prod"]

FROM production AS production-nginx

Expand All @@ -62,4 +66,7 @@ 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
ARG PORT=3000
ENV PORT=${PORT}

CMD sed -i "s/127.0.0.1/$(hostname -i)/" /etc/nginx/nginx.conf && sed -i "s/:3000/:$PORT/" /etc/nginx/nginx.conf && nginx && npm run prod
2 changes: 1 addition & 1 deletion packages/network-store/src/network.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class NetworkStore {
}
}

private initiateNetworkFromUrlQuery(): Network["id"] | undefined {
private initiateNetworkFromUrlQuery(): void {
if (typeof window === "undefined") {
return;
}
Expand Down

0 comments on commit ed22ad7

Please sign in to comment.