From b7633e97bfb8b9c4cb4f3a1c86171028902d0b7f Mon Sep 17 00:00:00 2001 From: Gabriel Camba Gonzalez Date: Fri, 27 Oct 2023 12:37:52 -0300 Subject: [PATCH 1/4] added docs submodule [WIP- Check why is not compiling] --- .docker/dev.docker.env | 1 + .gitmodules | 3 +++ cw_docs | 1 + docker-compose.yml | 10 ++++++++++ ink-compiler-be | 2 +- 5 files changed, 16 insertions(+), 1 deletion(-) create mode 160000 cw_docs diff --git a/.docker/dev.docker.env b/.docker/dev.docker.env index d6844696..0c5e2fba 100644 --- a/.docker/dev.docker.env +++ b/.docker/dev.docker.env @@ -4,3 +4,4 @@ DB_EXTERNAL_PORT=27027 BACKEND_EXTERNAL_PORT=8000 WEB_EXTERNAL_PORT=3000 WEB_ENVIRONMENT="production" +DOC_EXTERNAL_PORT=3020 diff --git a/.gitmodules b/.gitmodules index 3b8f37d7..45eeab27 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "ink-compiler-be"] path = ink-compiler-be url = https://github.com/protofire/ink-compiler-be.git +[submodule "cw_docs"] + path = cw_docs + url = https://github.com/protofire/cw_docs diff --git a/cw_docs b/cw_docs new file mode 160000 index 00000000..11aa2c3e --- /dev/null +++ b/cw_docs @@ -0,0 +1 @@ +Subproject commit 11aa2c3e743fce64e97eae82a17a8416fb8ce833 diff --git a/docker-compose.yml b/docker-compose.yml index a1341d1f..40064df8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,3 +49,13 @@ services: image: mongo:5.0.16 networks: - polkadot-wizard + doc: + container_name: ${CONTAINER_BASE}_doc + build: + context: ./cw_docs + dockerfile: ./Dockerfile + target: runner + ports: + - ${DOC_EXTERNAL_PORT}:3000 + networks: + - polkadot-wizard diff --git a/ink-compiler-be b/ink-compiler-be index bc79e834..2a14508b 160000 --- a/ink-compiler-be +++ b/ink-compiler-be @@ -1 +1 @@ -Subproject commit bc79e8345f0519be799a37105dd58d24203a781f +Subproject commit 2a14508bb189816d574ea700a7a9d13cf99b3cf1 From 7dc1d8494b2b5920891ed4952696e74f75c45844 Mon Sep 17 00:00:00 2001 From: 0xLucca <0xlucca.dev@gmail.com> Date: Thu, 9 Nov 2023 16:07:49 -0300 Subject: [PATCH 2/4] Add DOCUMENTATION_URL env var --- docker-compose.yml | 4 ++-- src/constants/routes.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 40064df8..32ed16d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,6 +34,7 @@ services: - ${BACKEND_EXTERNAL_PORT}:8000 environment: - MONGOURI=mongodb://mongodb:27017 + - NEXT_PUBLIC_DOCUMENTATION_URL=http://localhost:${DOC_EXTERNAL_PORT} networks: - polkadot-wizard depends_on: @@ -54,8 +55,7 @@ services: build: context: ./cw_docs dockerfile: ./Dockerfile - target: runner ports: - ${DOC_EXTERNAL_PORT}:3000 networks: - - polkadot-wizard + - polkadot-wizard \ No newline at end of file diff --git a/src/constants/routes.ts b/src/constants/routes.ts index 3f6d791f..1dde83ec 100644 --- a/src/constants/routes.ts +++ b/src/constants/routes.ts @@ -4,7 +4,9 @@ export const ROUTES = { CONTRACTS: '/contracts', CUSTOM: '/custom-contract', CONTRACTDETAIL: '/contract-detail', - DOCUMENTATION: 'https://contractwizard-docs.vercel.app/', + DOCUMENTATION: + process.env.NEXT_PUBLIC_DOCUMENTATION_URL || + 'https://contractwizard-docs.vercel.app/', TELEGRAM: 'https://t.me/+u5M4K7vKfbQxZjMx', GITHUB: 'https://github.com/protofire/polkadot-contract-wizard"' } as const From e37a7334a9a4e6c33b5f51d23335df1776f4ead6 Mon Sep 17 00:00:00 2001 From: 0xLucca <0xlucca.dev@gmail.com> Date: Thu, 9 Nov 2023 16:50:32 -0300 Subject: [PATCH 3/4] Set commit version to main --- ink-compiler-be | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ink-compiler-be b/ink-compiler-be index 2a14508b..bc79e834 160000 --- a/ink-compiler-be +++ b/ink-compiler-be @@ -1 +1 @@ -Subproject commit 2a14508bb189816d574ea700a7a9d13cf99b3cf1 +Subproject commit bc79e8345f0519be799a37105dd58d24203a781f From 4b9aeaf896ebd76dd057b71da2818541611b6e7c Mon Sep 17 00:00:00 2001 From: 0xLucca <0xlucca.dev@gmail.com> Date: Fri, 10 Nov 2023 12:21:32 -0300 Subject: [PATCH 4/4] Replace DOCUMENTATION with DOCUMENTATION_URL --- src/constants/config.ts | 4 ++++ src/constants/routes.ts | 3 --- src/view/layout/MainDrawer/DrawerContent.tsx | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/constants/config.ts b/src/constants/config.ts index 50208a21..aa4658d3 100644 --- a/src/constants/config.ts +++ b/src/constants/config.ts @@ -83,3 +83,7 @@ export function getBackendApiConfig(basePath: string): BackendApiConfig { export const apiBaseUrlPath = `/api` export const BACKEND_API = getBackendApiConfig(apiBaseUrlPath) + +export const DOCUMENTATION_URL = + process.env.NEXT_PUBLIC_DOCUMENTATION_URL || + 'https://contractwizard-docs.vercel.app/' diff --git a/src/constants/routes.ts b/src/constants/routes.ts index 1dde83ec..f1b5d6ef 100644 --- a/src/constants/routes.ts +++ b/src/constants/routes.ts @@ -4,9 +4,6 @@ export const ROUTES = { CONTRACTS: '/contracts', CUSTOM: '/custom-contract', CONTRACTDETAIL: '/contract-detail', - DOCUMENTATION: - process.env.NEXT_PUBLIC_DOCUMENTATION_URL || - 'https://contractwizard-docs.vercel.app/', TELEGRAM: 'https://t.me/+u5M4K7vKfbQxZjMx', GITHUB: 'https://github.com/protofire/polkadot-contract-wizard"' } as const diff --git a/src/view/layout/MainDrawer/DrawerContent.tsx b/src/view/layout/MainDrawer/DrawerContent.tsx index de82c089..1c146940 100644 --- a/src/view/layout/MainDrawer/DrawerContent.tsx +++ b/src/view/layout/MainDrawer/DrawerContent.tsx @@ -9,6 +9,7 @@ import GithubIcon from '@mui/icons-material/GitHub' import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined' import OpenInNewOutlinedIcon from '@mui/icons-material/OpenInNewOutlined' import { ROUTES } from '@/constants/routes' +import { DOCUMENTATION_URL } from '@/constants' interface Props { version: string @@ -41,7 +42,7 @@ const DrawerContent = ({ version, backendApiVersion }: Props) => { >