up
This commit is contained in:
parent
118e205dee
commit
49b0adabfc
3 changed files with 148 additions and 33 deletions
63
README.md
63
README.md
|
@ -24,18 +24,16 @@ Feature/fix scritte in ordine di priorità
|
|||
[ ] Al momento sul marker temporaneo si vede l'immagine rotta, sul temporaneo non bisogna mostrare nulla <br>
|
||||
[ ] Creare form per ricerca tra i titoli/descrizioni dei marker esistenti (query esempio: "divano") <br>
|
||||
[ ] Milgiorare css del form inserimento dati marker <br>
|
||||
[ ] Inserire la posizione del marker tramite il gps dello smartphone<br>
|
||||
[ ] Scatta la foto del marker da uploadare direttamente in app (su alcuni smartphone gia lo fa) <br>
|
||||
[ ] Creare form e gestire login utenti <br>
|
||||
[ ] Possibilità di aggiungere piu di una foto per un marker <br>
|
||||
|
||||
### BE
|
||||
[ ] Inserire la posizione del marker tramite il gps dello smartphone<br>
|
||||
|
||||
<br><br>
|
||||
|
||||
# INSTALLAZIONE
|
||||
# ISTRUZIONI INSTALLAZIONE
|
||||
|
||||
## Dipendenze
|
||||
## Installazione dipendenze
|
||||
|
||||
#### Installa mariadb
|
||||
<code>sudo apt update && sudo apt install mariadb</code>
|
||||
|
@ -46,7 +44,7 @@ _trobleshooting: cerca nvm in .bashrc_
|
|||
|
||||
## Installazione ruscomap
|
||||
|
||||
#### Clona il git
|
||||
### Clona il git
|
||||
```
|
||||
# crea la cartella
|
||||
mkdir /var/www/html/leaflet/; cd /var/www/html/leaflet/;
|
||||
|
@ -55,10 +53,10 @@ mkdir /var/www/html/leaflet/; cd /var/www/html/leaflet/;
|
|||
git clone https://git.lattuga.netscossa/ruscomap.git
|
||||
```
|
||||
|
||||
#### Personalizza il file di configurazione db
|
||||
### Personalizza il file di configurazione db
|
||||
<code>nano /var/www/html/leaflet/ruscomap/config/default.json</code>
|
||||
|
||||
#### Inizializza db
|
||||
### Inizializza db
|
||||
```
|
||||
# usa la versione node spcificata nel file .nvmrc
|
||||
cd /var/www/html/leaflet/ruscomap/; nvm use
|
||||
|
@ -69,25 +67,10 @@ cd /var/www/html/leaflet/ruscomap/;
|
|||
# inzializza db
|
||||
mysql < intdb.sql
|
||||
```
|
||||
#### Apri porta sul firewall
|
||||
sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT
|
||||
### Apri porta sul firewall
|
||||
<code>sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT</code>
|
||||
|
||||
<br>
|
||||
|
||||
## CANCELLA UN RECORD DEL DB
|
||||
```
|
||||
mariadb -u ruscone -p
|
||||
|
||||
show databases;
|
||||
use ruscomap;
|
||||
show tables;
|
||||
select * from markers;
|
||||
DELETE FROM markers WHERE filename = '0a9f02167f85c845db2d4b81bbeef9d5';
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## SERVIZIO
|
||||
### Creare il servzio
|
||||
<code>nano /etc/systemd/system/ruscomap.service</code>
|
||||
|
||||
```
|
||||
|
@ -106,17 +89,16 @@ RestartSec=5
|
|||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
<br>
|
||||
### Creare file conf di apache
|
||||
|
||||
## APACHE CONF
|
||||
<code>nano /etc/apache2/site-enabled/ruscomap.conf</code>
|
||||
|
||||
```
|
||||
#PORT 80 RUSCOMAP
|
||||
<VirtualHost ruscomap.accol.li:80>
|
||||
<VirtualHost ruscomap.myserver.it:80>
|
||||
|
||||
DocumentRoot /var/www/html/leaflet/ruscomap/public
|
||||
ServerName ruscomap.accol.li
|
||||
ServerName ruscomap.myserver.it
|
||||
|
||||
ProxyPass / http://localhost:3000/
|
||||
ProxyPassReverse / http://localhost:3000/
|
||||
|
@ -125,8 +107,6 @@ RewriteEngine on
|
|||
RewriteCond %{HTTP:Upgrade} =websocket
|
||||
RewriteRule /(.*) ws://localhost:3000/$1 [P,L]
|
||||
|
||||
#Redirect permanent / https://pad.accol.li/
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/ruscomap.log
|
||||
CustomLog ${APACHE_LOG_DIR}/ruscomap-access.log combined
|
||||
|
||||
|
@ -135,7 +115,24 @@ CustomLog ${APACHE_LOG_DIR}/ruscomap-access.log combined
|
|||
|
||||
<br>
|
||||
|
||||
## SCRIPT AGGIORNA RUSCOMAP
|
||||
# ISTRUZIONI ADMIN
|
||||
|
||||
## Cancella un record del db
|
||||
|
||||
```
|
||||
mariadb -u ruscone -p
|
||||
|
||||
show databases;
|
||||
use ruscomap;
|
||||
show tables;
|
||||
select * from markers;
|
||||
DELETE FROM markers WHERE filename = '0a9f02167f85c845db2d4b81bbeef9d5';
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Script per aggiornare ruscomap
|
||||
|
||||
<code>nano /var/www/html/leaflet/ruscomap/AggiornaRuscoMap.sh</code>
|
||||
|
||||
```
|
||||
|
|
42
node_modules/.package-lock.json
generated
vendored
42
node_modules/.package-lock.json
generated
vendored
|
@ -161,6 +161,17 @@
|
|||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"node_modules/cron-parser": {
|
||||
"version": "4.9.0",
|
||||
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz",
|
||||
"integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==",
|
||||
"dependencies": {
|
||||
"luxon": "^3.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
|
@ -460,6 +471,19 @@
|
|||
"version": "1.9.4",
|
||||
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
|
||||
},
|
||||
"node_modules/long-timeout": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz",
|
||||
"integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w=="
|
||||
},
|
||||
"node_modules/luxon": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz",
|
||||
"integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
|
@ -592,6 +616,19 @@
|
|||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/node-schedule": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz",
|
||||
"integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==",
|
||||
"dependencies": {
|
||||
"cron-parser": "^4.2.0",
|
||||
"long-timeout": "0.1.1",
|
||||
"sorted-array-functions": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
|
@ -811,6 +848,11 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sorted-array-functions": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz",
|
||||
"integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA=="
|
||||
},
|
||||
"node_modules/sqlite": {
|
||||
"version": "5.1.1",
|
||||
"integrity": "sha512-oBkezXa2hnkfuJwUo44Hl9hS3er+YFtueifoajrgidvqsJRQFpc5fKoAkAor1O5ZnLoa28GBScfHXs8j0K358Q=="
|
||||
|
|
76
package-lock.json
generated
76
package-lock.json
generated
|
@ -14,6 +14,7 @@
|
|||
"leaflet": "^1.9.4",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"mysql": "^2.18.1",
|
||||
"node-schedule": "^2.1.1",
|
||||
"sqlite": "^5.1.1"
|
||||
}
|
||||
},
|
||||
|
@ -174,6 +175,17 @@
|
|||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"node_modules/cron-parser": {
|
||||
"version": "4.9.0",
|
||||
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz",
|
||||
"integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==",
|
||||
"dependencies": {
|
||||
"luxon": "^3.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
|
@ -473,6 +485,19 @@
|
|||
"version": "1.9.4",
|
||||
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
|
||||
},
|
||||
"node_modules/long-timeout": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz",
|
||||
"integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w=="
|
||||
},
|
||||
"node_modules/luxon": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz",
|
||||
"integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
|
@ -605,6 +630,19 @@
|
|||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/node-schedule": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz",
|
||||
"integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==",
|
||||
"dependencies": {
|
||||
"cron-parser": "^4.2.0",
|
||||
"long-timeout": "0.1.1",
|
||||
"sorted-array-functions": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
|
@ -824,6 +862,11 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sorted-array-functions": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz",
|
||||
"integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA=="
|
||||
},
|
||||
"node_modules/sqlite": {
|
||||
"version": "5.1.1",
|
||||
"integrity": "sha512-oBkezXa2hnkfuJwUo44Hl9hS3er+YFtueifoajrgidvqsJRQFpc5fKoAkAor1O5ZnLoa28GBScfHXs8j0K358Q=="
|
||||
|
@ -1049,6 +1092,14 @@
|
|||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"cron-parser": {
|
||||
"version": "4.9.0",
|
||||
"resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz",
|
||||
"integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==",
|
||||
"requires": {
|
||||
"luxon": "^3.2.1"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
|
@ -1266,6 +1317,16 @@
|
|||
"version": "1.9.4",
|
||||
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
|
||||
},
|
||||
"long-timeout": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz",
|
||||
"integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w=="
|
||||
},
|
||||
"luxon": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz",
|
||||
"integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ=="
|
||||
},
|
||||
"media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
|
@ -1367,6 +1428,16 @@
|
|||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
||||
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
|
||||
},
|
||||
"node-schedule": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz",
|
||||
"integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==",
|
||||
"requires": {
|
||||
"cron-parser": "^4.2.0",
|
||||
"long-timeout": "0.1.1",
|
||||
"sorted-array-functions": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
|
@ -1531,6 +1602,11 @@
|
|||
"object-inspect": "^1.13.1"
|
||||
}
|
||||
},
|
||||
"sorted-array-functions": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz",
|
||||
"integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA=="
|
||||
},
|
||||
"sqlite": {
|
||||
"version": "5.1.1",
|
||||
"integrity": "sha512-oBkezXa2hnkfuJwUo44Hl9hS3er+YFtueifoajrgidvqsJRQFpc5fKoAkAor1O5ZnLoa28GBScfHXs8j0K358Q=="
|
||||
|
|
Loading…
Reference in a new issue