Aggiorna README.md
This commit is contained in:
parent
f36e8ada69
commit
76aae75159
1 changed files with 61 additions and 0 deletions
61
README.md
61
README.md
|
|
@ -26,3 +26,64 @@ oppure
|
|||
volumes:
|
||||
- /home/nvme/dockerdata/geocoder:/data
|
||||
image: photon
|
||||
|
||||
## Installazione da immagine remota
|
||||
|
||||
si può utilizzare il docker-compose
|
||||
il sito è (https://github.com/rtuszik/photon-docker)
|
||||
attenzione che scarica più di 200GB e ci mette molto a unzippare tutto
|
||||
|
||||
```bash
|
||||
services:
|
||||
photon:
|
||||
image: rtuszik/photon-docker:latest
|
||||
container_name: photon1
|
||||
environment:
|
||||
- UPDATE_STRATEGY=PARALLEL
|
||||
- UPDATE_INTERVAL=720h # Check for updates every 30 days
|
||||
# - REGION=andorra # Optional: specific region (continent, country, or planet)
|
||||
# - APPRISE_URLS=pover://user@token # Optional: notifications
|
||||
volumes:
|
||||
- /home/nvme/dockerdata/geocoder1:/photon/data
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "2322:2322"
|
||||
```
|
||||
## Utilizzo con Nginx per un corretto funzionamento
|
||||
|
||||
inserire nel file di configurazione
|
||||
|
||||
```bash
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name photon.patachina.casacam.net;
|
||||
|
||||
ssl_certificate ssl/live/patachina.casacam.net/fullchain.pem;
|
||||
ssl_certificate_key ssl/live/patachina.casacam.net/privkey.pem;
|
||||
|
||||
|
||||
location / {
|
||||
proxy_pass http://192.168.1.4:2322;
|
||||
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;
|
||||
|
||||
# CORS headers
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Content-Type' always;
|
||||
|
||||
if ($request_method = OPTIONS) {
|
||||
add_header 'Access-Control-Max-Age' 1728000;
|
||||
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||
add_header 'Content-Length' 0;
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Loading…
Reference in a new issue