diff --git a/.gitignore b/.gitignore index 3c6d2cb6f..a366b4925 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,7 @@ node_modules .env.* yarn.lock .installed -install.sh -run.sh -build.sh package-lock.json dist +.temp + diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 323a0eee6..a7ddb0300 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,10 +1,15 @@ -FROM threefolddev/publishtools:latest -ENV DEBIAN_FRONTEND=noninteractive + +FROM gitpod/workspace-full:latest + +USER root +RUN apt-get update && apt-get install -y mc rsync + +#prepare for gitpod nodejs env +RUN rm -f /tmp/install_docker.sh && curl -s -o /tmp/install_docker.sh https://raw.githubusercontent.com/threefoldfoundation/data_threefold/development/gitpod_scripts/install_docker.sh && bash /tmp/install_docker.sh + +# RUN apt-get clean && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* + USER gitpod -RUN cd /tmp && wget https://raw.githubusercontent.com/threefoldfoundation/www_threefold_io/development/sites.json && sudo publishtools update && sudo publishtools install || echo "try 1" -USER root -RUN cd /tmp && sudo publishtools install --reset - -ENTRYPOINT [ "entrypoint.sh" ] +# ENTRYPOINT [ "/usr/bin/bash" ] diff --git a/.gitpod.yml b/.gitpod.yml index 9c12bd536..f5194bef4 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,7 +2,13 @@ image: file: .gitpod.Dockerfile # # Commands to start on workspace startup tasks: - - command: sudo /etc/init.d/redis-server start && sudo publishtools develop --repo www_threefold_io + # - init: bash /workspace/www_threefold_io/gitpod/install.sh + - command: | + rm -f /tmp/install.sh + curl -s -o /tmp/install.sh https://raw.githubusercontent.com/threefoldfoundation/data_threefold/development/install.sh + bash /tmp/install.sh + bash /workspace/data_threefold/gitpod_scripts/install.sh + bash /workspace/data_threefold/gitpod_scripts/run.sh ports: - port: 8080 onOpen: open-browser diff --git a/content/navigation/navigation.md b/content/navigation/navigation.md index 397c1eda4..96c01b0f0 100644 --- a/content/navigation/navigation.md +++ b/content/navigation/navigation.md @@ -6,7 +6,27 @@ navLinks: external: false expandable: false - - name: Grid + - name: Token + link: "" + external: false + expandable: true + submenu: + - title: Token Introduction + path: /token + - title: Buy TFT + path: https://threefold.io/info/threefold#/threefold__how_to_buy_and_sell + external: true + - title: Tokenomics + path: https://threefold.io/info/threefold#/threefold__tokenomics + external: true + - title: Distribution + path: https://threefold.io/info/threefold#/threefold__token_overview + external: true + - title: FAQ + path: https://forum.threefold.io/c/threefold-token/tft-faq/57 + external: true + + - name: Farming link: "" # /dropdown external: false expandable: true @@ -24,43 +44,36 @@ navLinks: path: https://forum.threefold.io/c/farming/farming-faq/53 external: true - - name: Token - link: "" - external: false - expandable: true - submenu: - - title: Token Introduction - path: /token - - title: How to buy TFT - path: https://threefold.io/info/threefold#/threefold__how_to_buy_and_sell - external: true - - title: ThreeFold Tokenomics - path: https://threefold.io/info/threefold#/threefold__tokenomics - external: true - - title: Token Distribution - path: https://threefold.io/info/threefold#/threefold__token_overview - external: true - - title: FAQ - path: https://forum.threefold.io/c/threefold-token/tft-faq/57 - external: true - - name: Use - link: "" - external: false + link: "https://cloud.threefold.io/" + external: true expandable: true submenu: - - title: Kubernetes Cloud - path: https://threefold.io/info/cloud#/cloud__evdc - external: true - - title: Quantum-Safe Storage - path: https://threefold.io/info/cloud#/cloud__threefold_filesystem - external: true + - title: Partners + path: /partners + - title: ThreeFold Cloud + path: https://cloud.threefold.io + external: true - title: ThreeFold Marketplace path: https://threefold.io/marketplace external: true - title: Digital Twin path: https://mydigitaltwin.io/ external: true + - title: Developers (SDK) + path: https://sdk.threefold.io/ + external: true + # - title: Kubernetes Cloud + # path: https://threefold.io/info/cloud#/cloud__evdc + # external: true + # - title: Quantum-Safe Storage + # path: https://threefold.io/info/cloud#/cloud__threefold_filesystem + # external: true + + # - name: Partners + # link: "/partners" # /dropdown + # external: false + # expandable: false - name: Technology link: "" # /dropdown @@ -68,7 +81,7 @@ navLinks: expandable: true submenu: - title: Grid Technology - path: https://threefold.io/info/threefold#/internet4__zos_3node_tfgrid_intro + path: https://threefold.io/info/threefold#/internet4__technology external: true - title: Zero-OS path: https://threefold.io/info/threefold#/internet4__tfgrid_primitives @@ -82,7 +95,7 @@ navLinks: - title: Web2 vs Web3 vs P2P path: https://threefold.io/info/threefold#/threefold__grid_compare external: true - - title: FAQ + - title: FAQ / Forum path: https://forum.threefold.io/c/technical-discussion/technical-faq/55 external: true diff --git a/gitpod/install.sh b/gitpod/install.sh new file mode 100644 index 000000000..3f456eaa3 --- /dev/null +++ b/gitpod/install.sh @@ -0,0 +1,53 @@ +set -e + + + +export base=/nodejs + +sudo chown gitpod:gitpod -R $base + +export PATH=$base/bin:$PATH + +source $base/nvm.sh + +cd $base + +rm -f yarn.lock +rm -rf .cache + +nvm install --lts +nvm use --lts + +npm install --global @gridsome/cli + +#go to the website +cd /workspace/www_threefold_io + +rm -f yarn.lock +rm -rf .cache + +#copy from the docker image to speedup +echo "sync node modules to website" +rsync -ra --delete $base/node_modules/ node_modules/ +echo "done" + +#make sure all modules are there +npm install + +cd /workspace +if ! [ -d "/workspace/data_threefold" ] +then + git clone https://github.com/threefoldfoundation/data_threefold +fi + + +rm -f ../content/blog +ln -s /workspace/data_threefold/content/blog ../content/blog +rm -f ../content/news +ln -s /workspace/data_threefold/content/news ../content/news +rm -f ../content/person +ln -s /workspace/data_threefold/content/person ../content/person +rm -f ../content/project +ln -s /workspace/data_threefold/content/project ../content/project + + diff --git a/gitpod/install_docker.sh b/gitpod/install_docker.sh new file mode 100644 index 000000000..46b59f767 --- /dev/null +++ b/gitpod/install_docker.sh @@ -0,0 +1,25 @@ +set -ex +sudo chown gitpod:gitpod -R /tmp + +export base=/nodejs +export lts=14.17.3 + +echo $base +sudo mkdir -p $base +sudo chown gitpod:gitpod -R $base +cd $base + +rm -f $base/nvm.sh +curl -s -o nvm.sh https://raw.githubusercontent.com/nvm-sh/nvm/master/nvm.sh +bash nvm.sh + +export NVM_DIR=$base +source $base/nvm.sh + +nvm install --lts +nvm use --lts + +cp /tmp/package.json . + +npm install --global @gridsome/cli +npm install diff --git a/gitpod/run.sh b/gitpod/run.sh new file mode 100644 index 000000000..6bf7e4870 --- /dev/null +++ b/gitpod/run.sh @@ -0,0 +1,18 @@ +set -e + +export base=/nodejs + +export PATH=$base/bin:$PATH + +source $base/nvm.sh + +nvm use --lts + +#go to the website +cd /workspace/www_threefold_io + +if [ -f vue.config.js ]; then +npm run-script serve +else +gridsome develop +fi \ No newline at end of file diff --git a/install_gitpod.sh b/install_gitpod.sh new file mode 100755 index 000000000..e2a71b6bc --- /dev/null +++ b/install_gitpod.sh @@ -0,0 +1,7 @@ +#!/bin/bash +rm -f /tmp/install.sh +curl -s -o /tmp/install.sh https://raw.githubusercontent.com/threefoldfoundation/data_threefold/development/install.sh +bash /tmp/install.sh +bash /workspace/data_threefold/gitpod_scripts/install.sh +bash /workspace/data_threefold/gitpod_scripts/run.sh + diff --git a/run.sh b/run.sh new file mode 100755 index 000000000..1566c9721 --- /dev/null +++ b/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +bash /workspace/data_threefold/gitpod_scripts/run.sh diff --git a/sites.json b/sites.json deleted file mode 100644 index b51e3b441..000000000 --- a/sites.json +++ /dev/null @@ -1,55 +0,0 @@ -[{ - "name": "www_threefold_io", - "url": "https://github.com/threefoldfoundation/www_threefold_io", - "branch": "", - "pull": false, - "reset": false, - "cat": 2, - "shortname": "threefold", - "path_code": "", - "domains": ["www.threefold.io", "www.threefold.me", "threefold.me", "new.threefold.io", "staging.threefold.io", "threefold.io"], - "descr": "is our entry point for everyone, redirect to the detailed websites underneith.", - "groups": [{ - "name": "tf1", - "members_users": ["kristof", "adnan", "rob"], - "members_groups": [] - }, { - "name": "tf2", - "members_users": ["polleke"], - "members_groups": ["tf1"] - }], - "acl": [], - "trackingid": "", - "opengraph": { - "title": "", - "description": "", - "url": "", - "type_": "article", - "image": "", - "image_width": "1200", - "image_height": "630" - } - }, { - "name": "data_threefold", - "url": "https://github.com/threefoldfoundation/data_threefold", - "branch": "", - "pull": false, - "reset": false, - "cat": 1, - "shortname": "data", - "path_code": "", - "domains": [], - "descr": "", - "groups": [], - "acl": [], - "trackingid": "", - "opengraph": { - "title": "", - "description": "", - "url": "", - "type_": "article", - "image": "", - "image_width": "1200", - "image_height": "630" - } - }] diff --git a/workspace.code-workspace b/workspace.code-workspace new file mode 100644 index 000000000..f5106b064 --- /dev/null +++ b/workspace.code-workspace @@ -0,0 +1,11 @@ +{ + "folders": [ + { + "path": "." + }, + { + "path": "../data_threefold" + } + ], + "settings": {} +} \ No newline at end of file