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..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: @@ -49,3 +50,12 @@ services: image: mongo:5.0.16 networks: - polkadot-wizard + doc: + container_name: ${CONTAINER_BASE}_doc + build: + context: ./cw_docs + dockerfile: ./Dockerfile + ports: + - ${DOC_EXTERNAL_PORT}:3000 + networks: + - polkadot-wizard \ No newline at end of file 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 3f6d791f..f1b5d6ef 100644 --- a/src/constants/routes.ts +++ b/src/constants/routes.ts @@ -4,7 +4,6 @@ export const ROUTES = { CONTRACTS: '/contracts', CUSTOM: '/custom-contract', CONTRACTDETAIL: '/contract-detail', - DOCUMENTATION: '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) => { >