pkg install, add link if package no have scripts
This commit is contained in:
@ -12,5 +12,7 @@ s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||
|
||||
``` sh *** off ***
|
||||
pkgname_flat=${pkgname//\//\~}
|
||||
pkgname_flat=${pkgname_flat%\~s6}
|
||||
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||
s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||
```
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
scan
|
||||
=
|
||||
|
||||
``` config
|
||||
python -m venv venv
|
||||
venv/bin/pip install fastapi "uvicorn[standard]" python-multipart
|
||||
```
|
||||
|
||||
@ -16,6 +16,6 @@ pip install einops scikit-image opencv-python-headless tqdm
|
||||
|
||||
``` sh *** upload_weights ***
|
||||
mkdir -p data/weights
|
||||
#rsync -avz ~/Downloads/mbd.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
||||
#rsync -avz ~/Downloads/docres.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
||||
rsync -avz ~/Downloads/mbd.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights/
|
||||
rsync -avz ~/Downloads/docres.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights/
|
||||
```
|
||||
|
||||
18
assets/var/gnu/unitprint/backend/scan/s6.md
Normal file
18
assets/var/gnu/unitprint/backend/scan/s6.md
Normal file
@ -0,0 +1,18 @@
|
||||
<pkgname>/s6
|
||||
=
|
||||
|
||||
|
||||
``` sh *** set ***
|
||||
pkgname_flat=${pkgname//\//\~}
|
||||
pkgname_flat=${pkgname_flat%\~s6}
|
||||
rm -f /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||
ln -sf $(pwd) /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||
s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||
```
|
||||
|
||||
``` sh *** off ***
|
||||
pkgname_flat=${pkgname//\//\~}
|
||||
pkgname_flat=${pkgname_flat%\~s6}
|
||||
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||
s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||
```
|
||||
3
assets/var/gnu/unitprint/backend/scan/s6/.pkgdata/run
Executable file
3
assets/var/gnu/unitprint/backend/scan/s6/.pkgdata/run
Executable file
@ -0,0 +1,3 @@
|
||||
#!/pkg/gnu/bin/zsh
|
||||
|
||||
/pkg/gnu/unitprint/backend/scan/venv/bin/python /pkg/gnu/unitprint/backend/scan/api.py
|
||||
@ -1,6 +1,6 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name local.unitprint.ru unitprint.ru 192.168.1.129;
|
||||
server_name unitprint.ru www.unitprint.ru 192.168.1.129;
|
||||
|
||||
access_log /pkg/gnu/unitprint/nginx/run/unitprint.access.log;
|
||||
error_log /pkg/gnu/unitprint/nginx/run/unitprint.error.log;
|
||||
@ -12,6 +12,22 @@ server {
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
||||
gzip_min_length 1000;
|
||||
|
||||
location /api/scan/ {
|
||||
proxy_pass http://127.0.0.1:15200/;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
proxy_send_timeout 300s;
|
||||
proxy_connect_timeout 300s;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:3000/;
|
||||
|
||||
|
||||
@ -6,8 +6,12 @@ ssh://git@root-kit.ru:17458/UnitPrint/web-app.git
|
||||
save_source
|
||||
```
|
||||
|
||||
``` sh *** patch ***
|
||||
npm install
|
||||
```
|
||||
|
||||
``` sh *** build ***
|
||||
git pull
|
||||
git pull || true
|
||||
npm install
|
||||
npm run build
|
||||
rm -rf ../dist
|
||||
@ -15,9 +19,11 @@ cp -rPl dist ..
|
||||
```
|
||||
|
||||
``` sh *** config ***
|
||||
rm -f src/.aeropkg.applied-build
|
||||
rm -f build-script.md
|
||||
chmod o+x /pkg/gnu/unitprint
|
||||
chown -R nginx:nginx /pkg/gnu/unitprint/web-app/dist
|
||||
nginx -s reload
|
||||
```
|
||||
|
||||
``` sh *** init ***
|
||||
|
||||
Reference in New Issue
Block a user