Aggiorna README.md
This commit is contained in:
parent
8e5c45a7b6
commit
2da194b3eb
1 changed files with 40 additions and 29 deletions
69
README.md
69
README.md
|
|
@ -4,44 +4,55 @@ per questo esempio scaricheremo i siti dal web usando
|
||||||
|
|
||||||
(https://forgit.patachina.it/Fabio/website-downloader.git)
|
(https://forgit.patachina.it/Fabio/website-downloader.git)
|
||||||
|
|
||||||
1. creare il folder principale es: dock clonando la git
|
## Installazione locale
|
||||||
|
|
||||||
```sh
|
1. installare i packages per il server npm
|
||||||
git clone https://forgit.patachina.it/Fabio/multi_static_website.git dock
|
|
||||||
```
|
|
||||||
|
|
||||||
2. scaricare i vari siti in directory differenti all'interno di dock
|
|
||||||
|
|
||||||
```
|
|
||||||
cd dock
|
|
||||||
downloadsite.sh https://www.decomposerize.com/ decomposerize
|
|
||||||
downloadsite.sh https://www.composerize.com/ composerize
|
|
||||||
downloadsite.sh https://www.composeverter.com/ composeverter
|
|
||||||
```
|
|
||||||
|
|
||||||
3. installare i packages per il server npm
|
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
4. inserire i parametri del server
|
2. inserire i parametri del server nel file .env
|
||||||
|
|
||||||
http o https
|
|
||||||
IP
|
|
||||||
porta
|
|
||||||
|
|
||||||
5. inserire le directory separate da ,
|
|
||||||
|
|
||||||
SITES=
|
|
||||||
|
|
||||||
6. il file diventa
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
TYPE=http
|
TYPE=http
|
||||||
HOST=192.168.1.3
|
HOST=192.168.1.3
|
||||||
PORT=12000
|
PORT=3600
|
||||||
SITES=composerize,composeverter,decomposerize
|
URL=https://mys.patachina2.casacam.net
|
||||||
```
|
```
|
||||||
|
|
||||||
7. avviare il server
|
3. avviare il server
|
||||||
|
|
||||||
node server.js
|
node server.js
|
||||||
|
|
||||||
|
## Installazione su Docker
|
||||||
|
|
||||||
|
1. creare l'immagine "sites"
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo docker build -t sites .
|
||||||
|
```
|
||||||
|
|
||||||
|
2a. lanciare con docker-compose
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
2b. lanciare con portainer
|
||||||
|
|
||||||
|
```sh
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: sites:latest
|
||||||
|
container_name: sites
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 3600:3000
|
||||||
|
volumes:
|
||||||
|
- /home/nvme/dockerdata/sites:/usr/src/app/sites
|
||||||
|
environment:
|
||||||
|
NODE_ENV: production
|
||||||
|
PORT: 3000
|
||||||
|
HOST: 0.0.0.0
|
||||||
|
TYPE: http
|
||||||
|
URL: https://mys.patachina2.casacam.net
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue