modif setup

This commit is contained in:
philc 2024-11-26 15:51:37 +01:00
parent 690c207fb9
commit 2328276a5a
2 changed files with 9 additions and 9 deletions

View File

@ -75,9 +75,9 @@ $ mkdir ~/apxtowns # if it does not 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) # 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
$ cd ~/apxtowns/dev-ants $ cd ~/apxtowns/dev-ants
$ wget https://testwall-ants.ndda.fr/setup.sh $ wget https://app1.smatchit.io/setup.sh
$ chmod +x setup.sh $ chmod +x setup.sh
$ . setup.sh adminapi https://testwall-ants.ndda.fr https://gitea.ndda.fr/apxtri/adminapi $ . setup.sh adminapi https://app1.smatchit.io https://gitea.ndda.fr/apxtri/adminapi
``` ```
Open http://admin.adminapi.dev.ants/index_en.html (**notice the dot instead of -** ) in your browser after installation. you are ready to dev in adminapi Open http://admin.adminapi.dev.ants/index_en.html (**notice the dot instead of -** ) in your browser after installation. you are ready to dev in adminapi
@ -95,9 +95,9 @@ Until the web interface allow it here are usefull process to:
``` ```
This will create a new tribe that you can manage in http://admin.tribename.dev.ants (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 (a standard .giitignore is generate ready if you want to version your code in apxtri)
* To add a new tribe from an existing tribe host in testwall-ants.ndda.fr, we want set a dev env from git repo named smatchit with data that come from testwall-ants.ndda.fr the last night. To get data you must have the password to access backup. * To add a new tribe from an existing tribe host in app1.smatchit.io, we want set a dev env from git repo named smatchit with data that come from app1.smatchit.io the last night. To get data you must have the access_code to access backup (request to admin of smatchit).
``` ```
cd .. && . setup.sh smatchit https://testwall-ants.ndda.fr https://gitea.ndda.fr/smatchit/smatchit cd .. && . setup.sh smatchit https://app.smatchit.io https://gitea.ndda.fr/smatchit/smatchit
``` ```
To conf a new website To conf a new website
* Update in adminapi/objects/tribes/itm/tribename.json add domaine name in dns * Update in adminapi/objects/tribes/itm/tribename.json add domaine name in dns

View File

@ -30,9 +30,9 @@ codekey=$4 # code to access backend of the tribe in case it is not newtribe or a
function help { function help {
echo "Need more params, cmd must be $ . setup.sh <tribename> <url to get data> <gitrepourl> <codekey to getdata>" echo "Need more params, cmd must be $ . setup.sh <tribename> <url to get data> <gitrepourl> <codekey to getdata>"
echo "Example1: . setup.sh adminapi https://app1.smatchit.io https://gitea.ndda.fr/apxtri/adminapi" echo "Example1: . setup.sh adminapi https://app1.smatchit.io?code= https://gitea.ndda.fr/apxtri/adminapi"
echo " install adminapi from the repo (with git accessright) and get data for adminapi from testwall-ants.nnda.fr" echo " install adminapi from the repo (with git accessright) and get data for adminapi from testwall-ants.nnda.fr"
echo "Example2: setup.sh smatchit https://admin.smatchit.io 1234" echo "Example2: setup.sh smatchit https://admin.smatchit.io?code=1234"
echo " install smatchit as a copy of testwall-ants.ndda.fr but not from the git (you don't need to have git acess but need to know a specific code)" echo " install smatchit as a copy of testwall-ants.ndda.fr but not from the git (you don't need to have git acess but need to know a specific code)"
echo "Example3: setup.sh smatchit newtribe" echo "Example3: setup.sh smatchit newtribe"
echo " create a new empty tribe" echo " create a new empty tribe"
@ -45,7 +45,7 @@ else
if [ "$url" == "newtribe" ]; then if [ "$url" == "newtribe" ]; then
mkdir -p "${tribe}" mkdir -p "${tribe}"
else else
wget "${url}/${tribe}/setup.objects.tar.gz?code=${codekey}" -o setup.objects.tar.gz wget "${url}/${tribe}/backups/setup.objects.tar.gz?code=${codekey}" -O setup.objects.tar.gz
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "Check the url:$url that seems not answer, check with tribe's admin if your access code is still valid" echo "Check the url:$url that seems not answer, check with tribe's admin if your access code is still valid"
help help
@ -54,9 +54,9 @@ else
#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?code=${codekey}" -o setup.objects.tar.gz wget "${url}/${tribe}/backups/setup.apxtri.tar.gz?code=${codekey}" -O setup.objects.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
wget "${url}/${tribe}/setup.schema.tar.gz?code=${codekey}" -o setup.objects.tar.gz wget "${url}/${tribe}/backups/setup.schema.tar.gz?code=${codekey}" -O setup.objects.tar.gz
tar -xzf setup.schema.tar.gz -C . -p && rm setup.schema.tar.gz tar -xzf setup.schema.tar.gz -C . -p && rm setup.schema.tar.gz
#wget "${url}/${tribe}/setup.nginx.tar.gz" #wget "${url}/${tribe}/setup.nginx.tar.gz"
#tar -xzf setup.nginx.tar.gz -C . -p && rm setup.nginx.tar.gz #tar -xzf setup.nginx.tar.gz -C . -p && rm setup.nginx.tar.gz