diff --git a/README.md b/README.md index 870380c..17239c3 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,8 @@ adminapi is a special tribe that rules all tribes to provide a SAAS solution eas Install an ubuntu desktop machine https://ubuntu.com/desktop ``` -$ sudo apt update -$ sudo apt upgrade -$ sudo apt install git vim libcap2-bin p7zip-full p7zip-rar curl nginx +$ sudo apt update && sudo apt upgrade +$ sudo apt install git vim libcap2-bin p7zip-full p7zip-rar curl nginx cmdtest ``` In the next step replace {apxuser} by the login user you used to install ubuntu @@ -58,20 +57,13 @@ $ sudo visudo # Add the following line to the file: $ {apxuser} ALL=(ALL) NOPASSWD: ALL $ mkdir ~apxtowns/dev-ants -$ sudo echo "127.0.0.1 dev-ants" > /etc/hosts # Install the latest version of nvm (check the website for the latest version: https://github.com/nvm-sh/nvm) $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash # Close and re-open the terminal under the apxuser $ nvm --version # Then recheck the nvm version $ nvm --version -# Install Node.js, npm, and yarn. Follow the online instructions to update the configuration properly. -$ nvm install node -$ node --version # to check the Node.js version -$ npm install --global yarn -$ yarn --version # to check the yarn version $ mkdir ~/apxtowns # if it does not exist - # Create a town name that does not exist for a nation and create forlder {tonwname}-{nation} # Following example dev is a town and ants is a nation (you can create an existing town localy but you won't be able to join the ants network if this towns already exist) $ mkdir ~/apxtowns/dev-ants @@ -92,7 +84,7 @@ Until the web interface allow it here are usefull process to: * create an empty tribe call tribename ``` - run . setup.sh tribename + run . setup.sh tribename newtribe ``` This will create a new tribe that you can manage in http://admin.tribename.dev.ants don't forget /etc/hosts update (a standard .giitignore is generate ready if you want to version your code in apxtri) diff --git a/apxtri/setup/setup.sh b/apxtri/setup/setup.sh index 5b2e902..c5a01c9 100755 --- a/apxtri/setup/setup.sh +++ b/apxtri/setup/setup.sh @@ -50,8 +50,8 @@ else help else # add 127.0.0.1 town.nation in /ertc/hoss if not already exist to make localhost available - dns=$(basename "$PWD" | sed 's/-/./g') - grep -q "^127.0.0.1 $dns" /etc/hosts || echo "127.0.0.1 $dns" | sudo tee -a /etc/hosts > /dev/null + #dns=$(basename "$PWD" | sed 's/-/./g') + #grep -q "^127.0.0.1 $dns" /etc/hosts || echo "127.0.0.1 $dns" | sudo tee -a /etc/hosts > /dev/null if [ -z "$gitrepo" ]; then wget "${url}/${tribe}/setup.apxtri.tar.gz" tar -xzf setup.apxtri.tar.gz -C . -p && rm setup.apxtri.tar.gz @@ -76,8 +76,15 @@ else # add specific dependancy for tribe if apxtri exist cd "$tribe" if [ -d "$PWD/apxtri" ]; then + nvm install --lts + nvm use --lts yarn install fi + if [ -d "$PWD/pytri" ]; then + sudo apt install python3-venv -y + python3 -m venv pythonenv + echo "Python virtual env venv installed, don't forget to use $ source ${tribe}/pythonenv/bin/activate; before running any python script then $ deactivate" + fi # run as dev that will create missing file to make it works cd ../adminapi yarn dev