Mise à jour de 'Setup'

philc 2023-05-02 08:14:50 +00:00
parent b522ef1c91
commit d2aa41fb97

@ -8,12 +8,13 @@ In any doubt ask the community to set up a production server for small cost for
**Data pre-request:** **Data pre-request:**
* identify a **nationName** you want to belong to (example: ants) - see [nations list](https://apxtrib.crabdance.com/socialworld/objects/nations/searchindex/nationslist.json) * identify a **nationName** you want your town belongs to, this means that your tyown will follow the law of this nation (example: ants) - see [nations list](https://apxtrib.crabdance.com/socialworld/objects/nations/searchindex/nationslist.json)
* a **townName** that does not exist (example:) [towns list](https://apxtrib.crabdance.com/socialworld/objects/nations/searchindex/townslist.json) * a **townName** that does not already exist (example:) [towns list](https://apxtrib.crabdance.com/socialworld/objects/nations/searchindex/townslist.json)
* **sudoerUser** that will be create with root access right on your machine * **sudoerUser** that will be create with root access right on your machine.
* a **dns** that redirect to your public IP server * a **dns** that redirect to your public IP server
- For dev: set in /etc/hosts with 127.0.0.1 townName.nationName - For dev on the same machine, add in /etc/hosts this line: 127.0.0.1 adminapx
- For prod: example: mooo.com, register a townname.nationname A IP adresss with your own domaine - For dev on a different machine, add in /etc/hosts this line: {localIP} adminapx
- For prod, register a townname.nationname A IP adresss with your own domain name
see the free DNS Solution if you have not a domain [https://gitea.ndda.fr/apxtrib/apxtrib/wiki/UsefullfreeDNS] <br> see the free DNS Solution if you have not a domain [https://gitea.ndda.fr/apxtrib/apxtrib/wiki/UsefullfreeDNS] <br>
to get your public IP [https://www.whatismyip.com/](https://www.whatismyip.com) to get your public IP [https://www.whatismyip.com/](https://www.whatismyip.com)
@ -31,11 +32,11 @@ This tuto will:
* use nginx as reverse proxy based on dns abd url to the apXtrib routes * use nginx as reverse proxy based on dns abd url to the apXtrib routes
* use nginx to serve static file based on dns and file name * use nginx to serve static file based on dns and file name
* use pm2 to manage apxtrib.js, see [pm2 doc](https://pm2.keymetrics.io/docs/usage/pm2-doc-single-page/) * use pm2 to manage apxtrib.js, see [pm2 doc](https://pm2.keymetrics.io/docs/usage/pm2-doc-single-page/)
* serve the apxtrib webapp graphical interface to manage your env (create new ClientId space, manage your server's ressource,... ) * serve adminapx interface onto http://adminapx webapp graphical interface to manage your setup and more
**At the end** **At the end**
* **For production:** you will have a town live instance link to the nationchains. Graphical interface will be on https://townName.nationName.dns with your data
* **For dev:** a local town with **no link to the nationchains**, to create/test plugins/new feature, that you can also use as pre-prod available in http://townname.nationName You will have a town server. Graphical interface will accessible as a public service on https://yourdns or local http://adminapx
## To set up a machine ## To set up a machine
@ -54,7 +55,7 @@ Create a safe user (with sudo access) in this example phil
phil ALL=(ALL) NOPASSWD: ALL phil ALL=(ALL) NOPASSWD: ALL
# exit and save # exit and save
su phil su phil
sudo apt install git vim libcap2-bin p7zip-full p7zip-rar curl sudo apt install git vim libcap2-bin p7zip-full p7zip-rar curl nginx
# Install last nvm** (check website to get latest v0.xx) # Install last nvm** (check website to get latest v0.xx)
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 terminal under phil # close and re-open terminal under phil