{isConnectionClosed && (
- The connection to your Akash Console Shell was lost. (
-
- More Info
-
-
- )
+ The connection to your Akash Console Shell was not established or lost.
)}
diff --git a/apps/deploy-web/src/pages/faq/index.tsx b/apps/deploy-web/src/pages/faq/index.tsx
index f7c06cb97..f8a6f618d 100644
--- a/apps/deploy-web/src/pages/faq/index.tsx
+++ b/apps/deploy-web/src/pages/faq/index.tsx
@@ -6,6 +6,34 @@ import Layout from "@src/components/layout/Layout";
import { Title } from "@src/components/shared/Title";
const FaqEntries = [
+ {
+ anchor: "cpu-support",
+ title: "Which CPUs are officially supported?",
+ content: (
+ <>
+
+
+ Only x86_64 processors
+ {" "}
+ are officially supported for Akash deployments. This may change in the future and when ARM processors are supported it will be announced and
+ documented.
+
+
+ If you're on MacOS or linux, you can specify the{" "}
+
+ target platform
+ {" "}
+ when building your docker image. For example, if you're using a Dockerfile you can use the following command:
+
+
+ docker build -t my-image --platform linux/amd64 .
+
+ >
+ )
+ },
{
anchor: "lease-closed",
title: "My lease is closed, but the deployment isn't.",
@@ -34,36 +62,6 @@ const FaqEntries = [
>
)
},
- {
- anchor: "shell-lost",
- title: "Can't access shell: 'The connection to your Akash Console Shell was lost.'",
- content: (
- <>
-
- There is a{" "}
-
- known issue
- {" "}
- where the shell access will stop working if the provider pod gets restarted. Here's two workarounds you can try:
-
-
- -
- You can try the "UPDATE DEPLOYMENT" button in the "UPDATE" tab of your deployment. Even without changing your SDL, this should temporarily restore
- the shell access.
-
-
-
- -
- A permanent solution would be to add your own ssh access to your deployment, here is an{" "}
-
- example SDL
- {" "}
- with ssh.
-
-
- >
- )
- },
{
anchor: "shell-arrows-and-completion",
title: "Shell: UP arrow and TAB autocompletion does not work",
@@ -130,23 +128,25 @@ export default function FaqPage() {
Frequently Asked Questions
-
- {FaqEntries.map(entry => (
- -
- {entry.title}
-
- ))}
-
+
+
+ {FaqEntries.map(entry => (
+ -
+ {entry.title}
+
+ ))}
+
-
- {FaqEntries.map(entry => (
-
-
- {entry.title}
-
- {entry.content}
-
- ))}
+
+ {FaqEntries.map(entry => (
+
+
+ {entry.title}
+
+ {entry.content}
+
+ ))}
+
);
diff --git a/packages/network-store/src/network.store.ts b/packages/network-store/src/network.store.ts
index f919c4a90..6f13aff3f 100644
--- a/packages/network-store/src/network.store.ts
+++ b/packages/network-store/src/network.store.ts
@@ -105,7 +105,7 @@ export class NetworkStore {
}
}
- private initiateNetworkFromUrlQuery(): Network["id"] {
+ private initiateNetworkFromUrlQuery(): Network["id"] | undefined {
if (typeof window === "undefined") {
return;
}
From ed22ad7181e12f4e30583be2a9c118596146bf14 Mon Sep 17 00:00:00 2001
From: Yaroslav Grishajev
Date: Thu, 3 Oct 2024 11:16:52 +0200
Subject: [PATCH 10/11] feat(config): setup doppler env for api
---
apps/api/deploy.yml | 13 +------------
apps/api/package.json | 1 +
apps/indexer/package.json | 1 +
apps/stats-web/package.json | 1 +
apps/stats-web/src/hooks/useSelectedNetwork.ts | 0
apps/stats-web/src/lib/constants.ts | 0
apps/stats-web/src/store/networkStore.ts | 0
docker/Dockerfile.node | 11 +++++++++--
packages/network-store/src/network.store.ts | 2 +-
9 files changed, 14 insertions(+), 15 deletions(-)
create mode 100644 apps/stats-web/src/hooks/useSelectedNetwork.ts
create mode 100644 apps/stats-web/src/lib/constants.ts
create mode 100644 apps/stats-web/src/store/networkStore.ts
diff --git a/apps/api/deploy.yml b/apps/api/deploy.yml
index 9067ad4c4..0f632041c 100644
--- a/apps/api/deploy.yml
+++ b/apps/api/deploy.yml
@@ -6,19 +6,8 @@ services:
image: :
depends-on: cloud-sql-proxy
env:
- - GITHUB_PAT=
- - AKASH_SANDBOX_DATABASE_CS=
- - USER_DATABASE_CS=
- - SECRET_TOKEN=
- - NETWORK=
- - MASTER_WALLET_MNEMONIC=
- - POSTGRES_DB_URI=
- - ANONYMOUS_USER_TOKEN_SECRET=
- - SENTRY_DSN=
+ - DOPPLER_TOKEN=
- SENTRY_SERVER_NAME=
- - DEPLOYMENT_ENV=
- - STRIPE_SECRET_KEY=
- - STRIPE_WEBHOOK_SECRET=
expose:
- port: 3080
as: 80
diff --git a/apps/api/package.json b/apps/api/package.json
index f6e2f54bf..66f481867 100644
--- a/apps/api/package.json
+++ b/apps/api/package.json
@@ -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",
diff --git a/apps/indexer/package.json b/apps/indexer/package.json
index 6b23c4c92..4808c0737 100644
--- a/apps/indexer/package.json
+++ b/apps/indexer/package.json
@@ -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"
},
diff --git a/apps/stats-web/package.json b/apps/stats-web/package.json
index c9a54267f..2616ebbb7 100644
--- a/apps/stats-web/package.json
+++ b/apps/stats-web/package.json
@@ -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",
diff --git a/apps/stats-web/src/hooks/useSelectedNetwork.ts b/apps/stats-web/src/hooks/useSelectedNetwork.ts
new file mode 100644
index 000000000..e69de29bb
diff --git a/apps/stats-web/src/lib/constants.ts b/apps/stats-web/src/lib/constants.ts
new file mode 100644
index 000000000..e69de29bb
diff --git a/apps/stats-web/src/store/networkStore.ts b/apps/stats-web/src/store/networkStore.ts
new file mode 100644
index 000000000..e69de29bb
diff --git a/docker/Dockerfile.node b/docker/Dockerfile.node
index 630ccb489..6c5e38b9d 100644
--- a/docker/Dockerfile.node
+++ b/docker/Dockerfile.node
@@ -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/cli@doppler-8004D9FF50437357.rsa.pub && \
+ 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
@@ -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
\ No newline at end of file
+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
\ No newline at end of file
diff --git a/packages/network-store/src/network.store.ts b/packages/network-store/src/network.store.ts
index 6f13aff3f..2d65b61b2 100644
--- a/packages/network-store/src/network.store.ts
+++ b/packages/network-store/src/network.store.ts
@@ -105,7 +105,7 @@ export class NetworkStore {
}
}
- private initiateNetworkFromUrlQuery(): Network["id"] | undefined {
+ private initiateNetworkFromUrlQuery(): void {
if (typeof window === "undefined") {
return;
}
From 2e9f0f277b8b4924c894d1e68e6b363efb6a1f81 Mon Sep 17 00:00:00 2001
From: dharamveergit
Date: Thu, 10 Oct 2024 17:25:43 +0530
Subject: [PATCH 11/11] fix: useMemo in envVArUpdater
---
.../remote-deploy/RemoteRepositoryDeployManager.tsx | 4 ++--
apps/deploy-web/src/components/remote-deploy/Repos.tsx | 8 ++------
.../RemoteBuildInstallConfig.tsx | 4 ++--
.../remote-deploy/update/RemoteDeployUpdate.tsx | 4 ++--
4 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/apps/deploy-web/src/components/remote-deploy/RemoteRepositoryDeployManager.tsx b/apps/deploy-web/src/components/remote-deploy/RemoteRepositoryDeployManager.tsx
index 368fdce0f..75eae49c2 100644
--- a/apps/deploy-web/src/components/remote-deploy/RemoteRepositoryDeployManager.tsx
+++ b/apps/deploy-web/src/components/remote-deploy/RemoteRepositoryDeployManager.tsx
@@ -1,4 +1,4 @@
-import { Dispatch, useEffect, useState } from "react";
+import { Dispatch, useEffect, useMemo, useState } from "react";
import { Control, UseFormSetValue } from "react-hook-form";
import { Button, Spinner, Tabs, TabsContent, TabsList, TabsTrigger } from "@akashnetwork/ui/components";
import { Bitbucket, Github as GitIcon, GitlabFull } from "iconoir-react";
@@ -53,7 +53,7 @@ const RemoteRepositoryDeployManager = ({
const shouldResetValue = isRepoUrlDefault(services?.[0]?.env || []);
- const envVarUpdater = new EnvVarUpdater(services);
+ const envVarUpdater = useMemo(() => new EnvVarUpdater(services), [services]);
const { reLoginWithGithub, loginWithGithub } = new GitHubService();
diff --git a/apps/deploy-web/src/components/remote-deploy/Repos.tsx b/apps/deploy-web/src/components/remote-deploy/Repos.tsx
index 5c50684b7..8894c304e 100644
--- a/apps/deploy-web/src/components/remote-deploy/Repos.tsx
+++ b/apps/deploy-web/src/components/remote-deploy/Repos.tsx
@@ -1,4 +1,4 @@
-import { Dispatch, useEffect, useState } from "react";
+import { Dispatch, useEffect, useMemo, useState } from "react";
import { UseFormSetValue } from "react-hook-form";
import {
Button,
@@ -64,10 +64,8 @@ const Repos = ({
const [directory, setDirectory] = useState(null);
const [open, setOpen] = useState(false);
const [accounts, setAccounts] = useState([]);
- const envVarUpdater = new EnvVarUpdater(services);
const repo = repos?.find(r => r.html_url === currentRepoUrl);
const currentFolder = currentServiceEnv?.find(e => e.key === protectedEnvironmentVariables.FRONTEND_FOLDER);
-
const { currentFramework, isLoading: frameworkLoading } = useRemoteDeployFramework({
currentRepoUrl,
currentBranchName,
@@ -75,20 +73,18 @@ const Repos = ({
subFolder: currentFolder?.value,
setCpus: (cpus: number) => setValue("services.0.profile.cpu", +cpus > 2 ? +cpus : 2)
});
-
const { isLoading: isGettingDirectory, isFetching: isGithubLoading } = useSrcFolders(setFolders, formatUrlWithoutInitialPath(currentRepoUrl));
const { isLoading: isGettingDirectoryBit, isFetching: isBitLoading } = useBitSrcFolders(
setFolders,
formatUrlWithoutInitialPath(currentRepoUrl),
currentBranchName
);
-
const { isLoading: isGettingDirectoryGitlab, isFetching: isGitlabLoading } = useGitlabSrcFolders(
setFolders,
currentServiceEnv?.find(e => e.key === protectedEnvironmentVariables.GITLAB_PROJECT_ID)?.value
);
-
const isLoadingDirectories = isGithubLoading || isGitlabLoading || isBitLoading || isGettingDirectory || isGettingDirectoryBit || isGettingDirectoryGitlab;
+ const envVarUpdater = useMemo(() => new EnvVarUpdater(services), [services]);
useEffect(() => {
if (type === "github") {
diff --git a/apps/deploy-web/src/components/remote-deploy/deployment-configurations/RemoteBuildInstallConfig.tsx b/apps/deploy-web/src/components/remote-deploy/deployment-configurations/RemoteBuildInstallConfig.tsx
index 4136dfe5b..e3385987c 100644
--- a/apps/deploy-web/src/components/remote-deploy/deployment-configurations/RemoteBuildInstallConfig.tsx
+++ b/apps/deploy-web/src/components/remote-deploy/deployment-configurations/RemoteBuildInstallConfig.tsx
@@ -1,4 +1,4 @@
-import { useState } from "react";
+import { useMemo, useState } from "react";
import { UseFormSetValue } from "react-hook-form";
import { Card, CardContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Label, Separator } from "@akashnetwork/ui/components";
import { cn } from "@akashnetwork/ui/utils";
@@ -12,7 +12,7 @@ import BoxTextInput from "../BoxTextInput";
const RemoteBuildInstallConfig = ({ services, setValue }: { services: ServiceType[]; setValue: UseFormSetValue }) => {
const [expanded, setExpanded] = useState(false);
const currentService = services[0];
- const envVarUpdater = new EnvVarUpdater(services);
+ const envVarUpdater = useMemo(() => new EnvVarUpdater(services), [services]);
return (
(false);
const { control, watch, setValue } = useForm({ defaultValues: { services: [defaultService] } });
const { fields: services } = useFieldArray({ control, name: "services", keyName: "id" });
- const envVarUpdater = new EnvVarUpdater(services);
const { getTemplateById } = useTemplates();
const remoteDeployTemplate = getTemplateById(CI_CD_TEMPLATE_ID);
+ const envVarUpdater = useMemo(() => new EnvVarUpdater(services), [services]);
useEffect(() => {
const { unsubscribe }: any = watch(data => {