Skip to content

Commit

Permalink
fix: renamed env vars and urls
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 authored and Redm4x committed Sep 20, 2024
1 parent cc0e5f7 commit 1d2ba4b
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Directory: [provider-proxy](/provider-proxy/)

Provides data to the deploy website. The data is fetched from our Indexer database + coingecko for market data. This api also provides the endpoint for the [Web3 Index](https://web3index.org/) integration.

Url: [api.console.akash.network](https://api.console.akash.network)
Url: [console-api.akash.network](https://console-api.akash.network)
Directory: [api](/api/)

## Indexer
Expand Down
4 changes: 2 additions & 2 deletions apps/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ src/

### Api Versioning

The public api version will now be included in the url like so: api.console.akash.network/**v1**/\<endpoint>
The public api version will now be included in the url like so: console-api.akash.network/**v1**/\<endpoint>

Changes that are backward compatible like adding a new endpoint will be done in the existing version.
Changes that are **not** backward compatible, such as removing an endpoint, will be done in a new version. When releasing a new version, a list of breaking changes will be made available. We will keep the old version available for a while to give users enough time to migrate their applications to the latest version.

### Swagger Documentation

A swagger documentation is now available at https://api.console.akash.network/v1/swagger. You can use it to see the list of available endpoints and try them directly in your browser.
A swagger documentation is now available at https://console-api.akash.network/v1/swagger. You can use it to see the list of available endpoints and try them directly in your browser.

### Route Changes

Expand Down
2 changes: 1 addition & 1 deletion apps/api/env/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE_CORS_WEBSITE_URLS=https://stats.akash.network,https://console.akash.network,https://akash.network,https://akash.hooman.digital,http://localhost:3000,http://localhost:3001,https://akashconsole.vercel.app,https://console-beta.akash.network
CORS_WEBSITE_URLS=https://stats.akash.network,https://console.akash.network,https://akash.network,https://akash.hooman.digital,http://localhost:3000,http://localhost:3001,https://akashconsole.vercel.app,https://console-beta.akash.network
WEBSITE_URL=https://console-beta.akash.network
TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNT=10000000
DEPLOYMENT_ALLOWANCE_REFILL_AMOUNT=10000000
Expand Down
4 changes: 2 additions & 2 deletions apps/api/env/.env.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Secrets
AKASH_DATABASE_CS=
CONSOLE_GITHUB_PAT=
GITHUB_PAT=
ANONYMOUS_USER_TOKEN_SECRET=
HealthChecks_SyncAKTMarketData=
MASTER_WALLET_MNEMONIC=
Expand All @@ -12,7 +12,7 @@ STRIPE_PRICE_ID=
USER_DATABASE_CS=

# Configuration
CONSOLE_CORS_WEBSITE_URLS=
CORS_WEBSITE_URLS=
AUTH0_AUDIENCE=
AUTH0_ISSUER=
AUTH0_JWKS_URI=
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const appHono = new Hono();
appHono.use(
"/*",
cors({
origin: env.CONSOLE_CORS_WEBSITE_URLS?.split(",") || ["http://localhost:3000", "http://localhost:3001"]
origin: env.CORS_WEBSITE_URLS?.split(",") || ["http://localhost:3000", "http://localhost:3001"]
})
);

Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/services/external/githubService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { Auditor, ProviderAttributesSchema } from "@src/types/provider";
import { env } from "@src/utils/env";

export function getOctokit() {
const githubPAT = env.CONSOLE_GITHUB_PAT;
const githubPAT = env.GITHUB_PAT;

if (!githubPAT) {
throw new Error("CONSOLE_GITHUB_PAT is missing");
throw new Error("GITHUB_PAT is missing");
}

return new Octokit({
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { z } from "zod";

export const env = z
.object({
CONSOLE_CORS_WEBSITE_URLS: z.string().optional(),
CORS_WEBSITE_URLS: z.string().optional(),
NODE_ENV: z.string().optional(),
HEALTHCHECKS_ENABLED: z.string().optional(),
AKASH_DATABASE_CS: z.string().optional(),
Expand All @@ -12,7 +12,7 @@ export const env = z
NETWORK: z.string().default("mainnet"),
REST_API_NODE_URL: z.string().optional(),
SERVER_ORIGIN: z.string().optional().default("http://localhost:3080"),
CONSOLE_GITHUB_PAT: z.string().optional(),
GITHUB_PAT: z.string().optional(),
AUTH0_JWKS_URI: z.string().optional(),
AUTH0_AUDIENCE: z.string().optional(),
AUTH0_ISSUER: z.string().optional(),
Expand Down
2 changes: 1 addition & 1 deletion apps/deploy-web/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
- port: 3040
as: 80
accept:
- provider-proxy.console.akash.network
- console-provider-proxy.akash.network
to:
- global: true
profiles:
Expand Down
4 changes: 2 additions & 2 deletions apps/deploy-web/env/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ NEXT_PUBLIC_MANAGED_WALLET_DENOM=usdc
NEXT_PUBLIC_MASTER_WALLET_ADDRESS=akash1ss0d2yw38r6e7ew8ndye9h7kg62sem36zak4d5

NEXT_PUBLIC_STATS_APP_URL=https://stats.akash.network
NEXT_PUBLIC_PROVIDER_PROXY_URL=https://provider-proxy.akash.network
NEXT_PUBLIC_PROVIDER_PROXY_URL_WS=wss://provider-proxy.akash.network
NEXT_PUBLIC_PROVIDER_PROXY_URL=https://console-provider-proxy.akash.network
NEXT_PUBLIC_PROVIDER_PROXY_URL_WS=wss://console-provider-proxy.akash.network
NEXT_PUBLIC_NODE_ENV=$NODE_ENV
NEXT_PUBLIC_BASE_API_MAINNET_URL=https://console-api.akash.network
NEXT_PUBLIC_BASE_API_SANDBOX_URL=https://console-api-sandbox.akash.network
Expand Down
4 changes: 2 additions & 2 deletions apps/deploy-web/env/.env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ NEXT_PUBLIC_MANAGED_WALLET_DENOM=usdc
NEXT_PUBLIC_MASTER_WALLET_ADDRESS=akash1ss0d2yw38r6e7ew8ndye9h7kg62sem36zak4d5

NEXT_PUBLIC_STATS_APP_URL=https://stats.akash.network
NEXT_PUBLIC_PROVIDER_PROXY_URL=https://provider-proxy.akash.network
NEXT_PUBLIC_PROVIDER_PROXY_URL_WS=wss://provider-proxy.akash.network
NEXT_PUBLIC_PROVIDER_PROXY_URL=https://console-provider-proxy.akash.network
NEXT_PUBLIC_PROVIDER_PROXY_URL_WS=wss://console-provider-proxy.akash.network
NEXT_PUBLIC_NODE_ENV=$NODE_ENV
NEXT_PUBLIC_BASE_API_MAINNET_URL=https://console-api-mainnet-staging.akash.network
NEXT_PUBLIC_BASE_API_SANDBOX_URL=https://console-api-sandbox-staging.akash.network
Expand Down
6 changes: 3 additions & 3 deletions apps/stats-web/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export const selectedRangeValues: { [key: string]: number } = {
ALL: Number.MAX_SAFE_INTEGER
};

const productionMainnetApiUrl = "https://api.console.akash.network";
const productionTestnetApiUrl = "https://api-testnet.console.akash.network";
const productionSandboxApiUrl = "https://api-sandbox.console.akash.network";
const productionMainnetApiUrl = "https://console-api.akash.network";
const productionTestnetApiUrl = "https://console-api-testnet.akash.network";
const productionSandboxApiUrl = "https://console-api-sandbox.akash.network";
const productionHostnames = ["stats.akash.network"];

export const isProd = process.env.NODE_ENV === "production";
Expand Down
6 changes: 3 additions & 3 deletions doc/Internal_Endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Those endpoints are used for debugging and analytics purposes.

## GPU Stats

Url: https://api.console.akash.network/internal/gpu
Url: https://console-api.akash.network/internal/gpu

Returns a summary of the gpus on the network.

Expand Down Expand Up @@ -54,11 +54,11 @@ Returns a summary of the gpus on the network.
| memory_size | Ex: `16Gi` |

All query parameters can be combined, ex:
`https://api.console.akash.network/internal/gpu?provider=akash175llqyjvxfle9qwt740vm46772dzaznpzgm576&vendor=nvidia&model=rtx3060ti&memory_size=8Gi`
`https://console-api.akash.network/internal/gpu?provider=akash175llqyjvxfle9qwt740vm46772dzaznpzgm576&vendor=nvidia&model=rtx3060ti&memory_size=8Gi`

## Provider Versions

Url: https://api.console.akash.network/internal/provider-versions
Url: https://console-api.akash.network/internal/provider-versions

Returns a list of versions and the providers that are currently on that version. The `<UNKNOWN>` version corresponds to providers where the version could not be determined. The `/version` endpoint was broken for a long time, but is now fixed in [v0.5.0-rc11](https://github.com/akash-network/provider/releases/tag/v0.5.0-rc11)

Expand Down

0 comments on commit 1d2ba4b

Please sign in to comment.