docs(installer): add staging fallback for demo bootstrap
This commit is contained in:
parent
d0b1e58b46
commit
bc58b83be2
108
Miki-Bug-workspace/Installazione Netgescon/installerSistema.md
Normal file
108
Miki-Bug-workspace/Installazione Netgescon/installerSistema.md
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
# Installazione NetGescon via curl
|
||||||
|
|
||||||
|
## Macchina base Ubuntu 24.04
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL http://192.168.0.200:8000/installers/ubuntu2404-laravel-base.php -o /tmp/ubuntu2404-laravel-base.sh
|
||||||
|
sudo bash /tmp/ubuntu2404-laravel-base.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Bootstrap nodo NetGescon su IP locale
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL http://192.168.0.200:8000/installers/netgescon-node-bootstrap.php | sudo bash -s -- \
|
||||||
|
--repo-url git@your-gitea:studio/netgescon.git \
|
||||||
|
--branch main \
|
||||||
|
--app-url http://192.168.0.200 \
|
||||||
|
--server-name 192.168.0.200 \
|
||||||
|
--db-password 'StrongDbPass123!' \
|
||||||
|
--admin-email admin@netgescon.local \
|
||||||
|
--admin-password 'StrongAdminPass123!'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Macchina base via staging
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://staging.netgescon.it/installers/ubuntu2404-laravel-base.php -o /tmp/ubuntu2404-laravel-base.sh
|
||||||
|
sudo bash /tmp/ubuntu2404-laravel-base.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Bootstrap nodo NetGescon via staging
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://staging.netgescon.it/installers/netgescon-node-bootstrap.php | sudo bash -s -- \
|
||||||
|
--repo-url git@your-gitea:studio/netgescon.git \
|
||||||
|
--branch main \
|
||||||
|
--app-url https://staging.netgescon.it \
|
||||||
|
--server-name staging.netgescon.it \
|
||||||
|
--db-password 'StrongDbPass123!' \
|
||||||
|
--admin-email admin@netgescon.local \
|
||||||
|
--admin-password 'StrongAdminPass123!'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Bootstrap demo usando lo script servito da staging
|
||||||
|
|
||||||
|
Se il server di destinazione non riesce a raggiungere `192.168.0.200:8000`, puoi scaricare lo script da staging ma installare comunque il nodo demo con i parametri finali del sito.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://staging.netgescon.it/installers/netgescon-node-bootstrap.php -o /tmp/netgescon-node-bootstrap.sh
|
||||||
|
sudo bash /tmp/netgescon-node-bootstrap.sh \
|
||||||
|
--site-key netgescon-prod \
|
||||||
|
--repo-url git@your-gitea:studio/netgescon.git \
|
||||||
|
--branch main \
|
||||||
|
--app-url https://demo.netgescon.it \
|
||||||
|
--server-name demo.netgescon.it \
|
||||||
|
--db-password 'StrongDbPass123!' \
|
||||||
|
--admin-email admin@netgescon.local \
|
||||||
|
--admin-password 'StrongAdminPass123!'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Test endpoint installer
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -I http://192.168.0.200:8000/installers/ubuntu2404-laravel-base.php
|
||||||
|
curl -I http://192.168.0.200:8000/installers/netgescon-node-bootstrap.php
|
||||||
|
curl -I https://staging.netgescon.it/installers/netgescon-node-bootstrap.php
|
||||||
|
```
|
||||||
|
|
||||||
|
## Se `curl` dice `Failed to connect to 192.168.0.200 port 8000`
|
||||||
|
|
||||||
|
Questo errore significa che il server da cui stai lanciando il comando non riesce a raggiungere l'host che dovrebbe servire gli installer. In quel caso il file non viene scaricato e il comando successivo fallisce con `No such file or directory`.
|
||||||
|
|
||||||
|
Se il check verso `192.168.0.200` fallisce ma quello verso staging risponde `200 OK`, usa direttamente gli installer serviti da staging.
|
||||||
|
|
||||||
|
Se vuoi continuare a usare `192.168.0.200:8000`, devi prima verificare che sulla macchina `192.168.0.200` ci sia un web server o un `php artisan serve --host=0.0.0.0 --port=8000` attivo e raggiungibile dal server di destinazione.
|
||||||
|
|
||||||
|
## Esempio dell'errore ricevuto
|
||||||
|
|
||||||
|
```text
|
||||||
|
curl -fsSL http://192.168.0.200:8000/installers/netgescon-node-bootstrap.php -o /tmp/netgescon-node-bootstrap.sh
|
||||||
|
sudo bash /tmp/netgescon-node-bootstrap.sh \
|
||||||
|
--site-key netgescon-prod \
|
||||||
|
--repo-url git@your-gitea:studio/netgescon.git \
|
||||||
|
--branch main \
|
||||||
|
--app-url https://demo.netgescon.it \
|
||||||
|
--server-name demo.netgescon.it \
|
||||||
|
--db-password 'StrongDbPass123!' \
|
||||||
|
--admin-email admin@netgescon.local \
|
||||||
|
--admin-password 'StrongAdminPass123!'
|
||||||
|
curl: (7) Failed to connect to 192.168.0.200 port 8000 after 0 ms: Couldn't connect to server
|
||||||
|
[sudo] password for michele:
|
||||||
|
bash: /tmp/netgescon-node-bootstrap.sh: No such file or directory
|
||||||
|
michele@svr-netgescon:~$
|
||||||
|
```
|
||||||
|
|
||||||
|
## Correzione pratica immediata
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://staging.netgescon.it/installers/netgescon-node-bootstrap.php -o /tmp/netgescon-node-bootstrap.sh
|
||||||
|
sudo bash /tmp/netgescon-node-bootstrap.sh \
|
||||||
|
--site-key netgescon-prod \
|
||||||
|
--repo-url git@your-gitea:studio/netgescon.git \
|
||||||
|
--branch main \
|
||||||
|
--app-url https://demo.netgescon.it \
|
||||||
|
--server-name demo.netgescon.it \
|
||||||
|
--db-password 'StrongDbPass123!' \
|
||||||
|
--admin-email admin@netgescon.local \
|
||||||
|
--admin-password 'StrongAdminPass123!'
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue
Block a user