apxtrib/adminapi/www/adminapx/static/tpl/devophostawebapp_en.mustache

57 lines
2.8 KiB
Plaintext
Raw Normal View History

2023-05-31 13:19:21 +00:00
<h4>Host a web app</h4>
<p> A druid has to create a webapp space into his tribe/www/webappname. To do that he needs:</p>
<ul>
<li> a domain name that redirect to the IP of this town</li>
<li> Define which method to push content, by simply using the upload browser or by creating a linux account to connect by sftp and mount it in distance machine.</li>
</ul>
<p>Option sftp: as sudo</p>
<code>
$ sudo useradd -s /bin/bash -m -d /home/sagark -c "sagark" sagark
$ sudo paswd sagark to set a robust password
$ chmod o+rwx folderappname # workspace/townId-nationId/tribes/tribeId/www/appname
# su sagark
$ mkdir -p --mode 700 ~/tribes/smatchit/www
$ ln -s /home/phil/workspace/wall-ants/tribes/smatchit/www/smatchapp ~/tribes/smatchit/www/smatchapp
# su sudoer to add file to jail user in his home
$ sudo mkdir -p /home/sagark/dev
$ cd /home/sagark/dev
$ sudo mknod -m 666 null c 1 3
$ sudo mknod -m 666 tty c 5 0
$ sudo mknod -m 666 zero c 1 5
$ sudo mknod -m 666 random c 1 8
# change access right
$ userdel -r sagark
</code>
{{^auth}}
<p><b>You have to be authenticate on this town with accessright on tribe to request a new web space for this tribe.</b></p>
{{/auth}}
{{#auth}}
<p> Send him a request to create as alias:{{alias}}</p>
<div class="col-md-6">
<label for="inputdomain" class="form-label">A domain</label>
<input type="text" class="form-control" id="inputdomain" placeholder="A register domain that redirect to the town IP">
</div>
<div class="col-md-6">
<label for="inputappname" class="form-label">Name of your app</label>
<input type="text" class="form-control" id="inputappname" placeholder="folder name in www/ and name of xapp in header">
</div>
<div id="selectoffer" class="">
<label for="selectoffer" class="col-12 col-form-label">Choose your offer</label>
<div class="col-12">
<select class="form-select" id="chooseoffer" aria-label="" placeholder="To get a hosting web place">
{{#offers}}
<option {{#selected}}selected{{/selected}} value="{{offerid}}">{{title}}</option>
{{/offers}}
</select>
<input class="d-none" id="inputofferid" value="{{offerid}}">
</div>
</div>
<div class="col-12">
<label for="msgtodruid" class="form-label">Message</label>
<textarea rows="5" id="msgtodruid" class="form-control" placeholder="A message to tribe's druid about hosting"></textarea>
</div>
<button class="btn btn-primary"
onclick="tribes.addspaceweb(document.getElementById('inputofferid').value,document.getElementById('inputdomain').value,document.getElementById('inputappname').value,document.getElementById('msgtodruid').value);">
Request a space web</button>
{{/auth}}