update setup
This commit is contained in:
parent
9160345125
commit
243352b20f
14
README.md
14
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
|
Install an ubuntu desktop machine https://ubuntu.com/desktop
|
||||||
```
|
```
|
||||||
$ sudo apt update
|
$ sudo apt update && sudo apt upgrade
|
||||||
$ sudo apt upgrade
|
$ sudo apt install git vim libcap2-bin p7zip-full p7zip-rar curl nginx cmdtest
|
||||||
$ sudo apt install git vim libcap2-bin p7zip-full p7zip-rar curl nginx
|
|
||||||
```
|
```
|
||||||
In the next step replace {apxuser} by the login user you used to install ubuntu
|
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:
|
# Add the following line to the file:
|
||||||
$ {apxuser} ALL=(ALL) NOPASSWD: ALL
|
$ {apxuser} ALL=(ALL) NOPASSWD: ALL
|
||||||
$ mkdir ~apxtowns/dev-ants
|
$ 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)
|
# 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
|
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
|
||||||
# Close and re-open the terminal under the apxuser
|
# Close and re-open the terminal under the apxuser
|
||||||
$ nvm --version
|
$ nvm --version
|
||||||
# Then recheck the nvm version
|
# Then recheck the nvm version
|
||||||
$ 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
|
$ mkdir ~/apxtowns # if it does not exist
|
||||||
|
|
||||||
# Create a town name that does not exist for a nation and create forlder {tonwname}-{nation}
|
# 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)
|
# 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
|
$ 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
|
* 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)
|
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)
|
||||||
|
|
||||||
|
@ -50,8 +50,8 @@ else
|
|||||||
help
|
help
|
||||||
else
|
else
|
||||||
# add 127.0.0.1 town.nation in /ertc/hoss if not already exist to make localhost available
|
# add 127.0.0.1 town.nation in /ertc/hoss if not already exist to make localhost available
|
||||||
dns=$(basename "$PWD" | sed 's/-/./g')
|
#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
|
#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
|
if [ -z "$gitrepo" ]; then
|
||||||
wget "${url}/${tribe}/setup.apxtri.tar.gz"
|
wget "${url}/${tribe}/setup.apxtri.tar.gz"
|
||||||
tar -xzf setup.apxtri.tar.gz -C . -p && rm 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
|
# add specific dependancy for tribe if apxtri exist
|
||||||
cd "$tribe"
|
cd "$tribe"
|
||||||
if [ -d "$PWD/apxtri" ]; then
|
if [ -d "$PWD/apxtri" ]; then
|
||||||
|
nvm install --lts
|
||||||
|
nvm use --lts
|
||||||
yarn install
|
yarn install
|
||||||
fi
|
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
|
# run as dev that will create missing file to make it works
|
||||||
cd ../adminapi
|
cd ../adminapi
|
||||||
yarn dev
|
yarn dev
|
||||||
|
Loading…
Reference in New Issue
Block a user