removing setup model replace into apxtrib.js argv

This commit is contained in:
2023-06-01 07:30:05 +02:00
parent 908daaa8d3
commit c84a8c5aef
6 changed files with 32 additions and 551 deletions

View File

@@ -6,7 +6,7 @@
#
# ./sftpaccounttotribe.sh wall ants smatchit smatchapp sagark
@todo A faire
# @todo A faire
echo $1;
echo $2;
echo $3;
@@ -19,7 +19,18 @@ create_sshspace () {
# Create a linux account with the name tribeId
# $ sudo useradd tribeId
# $ passwd tribeId
# $ cd ~/workspace/towniD-natinId/tribes/tribeId/www
# into /home/tribeswww/
# create /tribeId
# sudo mount --bind /home/phil/workspace/wall-ants/tribes/tribeId/www /home/tribeswww/tribeId
# add in /etc/fstab
# /home/phil/workspace/wall-ants/tribes/tribeId/www /home/tribeswww/tribeId none defaults,bind 0 0
#in /etc/ssh/sshd_config
#Match User smatchit
# ForceCommand internal-sftp
# ChrootDirectory /home/tribeswww/smatchit
# in /www/ need to add
# copy and past /bin dev/ /etc/ lib/ lib64/
# in /bin cp /bin/bash or /bin/sh depending of /etc/passwd SHELL (check /etc/default/useradd to change if needed)
# to check dependance $ ldd /bin/bash
@@ -30,26 +41,11 @@ create_sshspace () {
# $ chmod -R 0755 /dev
#$ sudo cp /etc/passwd ./etc/ Need to do each new user
#$ sudo cp /etc/group ./etc/ Need to do each new user
#sudo mkdir -p /home/tribeswww/smatchit/smatchapp
# cd /home/tribeswww/smatchit/smatchapp
# sudo vim
# 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;
# sudo chown root:root /home/tribeswww/smatchit/smatchapp
# sudo chmod 0755 /home/tribeswww/smatchit/smatchapp
# sudo mkdir -p /home/tribeswww/smatchit/smatchapp/bin
# sudo cp -v /bin/bash /home/tribeswww/smatchit/smatchapp/bin/
# sudo mkdir -p /home/tribeswww/smatchit/smatchapp/lib64
# check ldd /bin/bash
# sudo cp -v /lib64/{libtinfo.so.5,libdl.so.2,libc.so.6,ld-linux-x86-64.so.2} /home/tribeswww/smatchit/smatchapp/lib64/
# sudo useradd smatchapp;
# sudo passwd smatchapp;
# sudo mkdir /home/tribeswww/smatchit/smatchapp/etc
# sudo cp -vf /etc/{passwd,group} /home/tribeswww/smatchit/smatchapp/etc/ (this have to be done each time a new user is create)
#sudo vim /etc/ssh/sshd_config
#
# To secure access nginx
# sudo apt install apache2-utils
# sudo htpasswd -c /townId-natiuonId/tribes/tribeId/.htpasswd user
# user: smatchit psw: sm@tch1t
}

View File

@@ -34,8 +34,13 @@ proxy_pass http://localhost:{{{api.port}}};
proxy_redirect off;
include proxy_params;
}
#to add htpasswd install apache2-utils => sudo htpasswd -c dirtown/tribes/tribeId/.htpasswd loginname passwd see man for option
location / {
{{#nginx.private}}
auth_basic "Mot de passe {{nginx.privatelogin}}";
auth_basic_user_file {{dirtown}}/tribes/{{tribeId}}/.htpasswd;
{{/nginx.private}}
root {{{nginx.fswww}}}/{{{nginx.website}}};
index index.html {{{nginx.pageindex}}};
}

View File

@@ -12,6 +12,7 @@
<li> install process made http://devfarm-ants available on your machine the /adminapi/www/adminapx/index_en.html to manage this dev town</li>
<li>if not working, check that your /etc/hosts contain 127.0.0.1 devfarm-ants</li>
<li>start the api in apxtrib folder $ yarn dev to allow manager adminapx to act on this trib</li>
<li>Restart nginx: sudo systemctl restart nginx</li>
</ul>
<p>Then you can dev in apxtrib to send your release to the project leader.</p>
<p>You can dev some app as a tribe level into /devfarm-ants see menu Mayor's Town/Manage Tribes to create a dev tribe. You can unzip a tribe into a folder for debuging or dev with real backup data.</p>
@@ -38,7 +39,6 @@
<button class="btn btn-outline-secondary" type="button" id="button-chgown">Give him the role on this town</button>
</div>
{{/devtown}}
{{/owner}}
</div>