commit 3a03934a15abe0bfabde27d15b1a53518c0b869c Author: Fabio Date: Wed Mar 26 23:55:01 2025 +0800 first commit diff --git a/.env b/.env new file mode 100644 index 0000000..40b3dba --- /dev/null +++ b/.env @@ -0,0 +1 @@ +PUBLIC_MAPBOX_TOKEN='pk.eyJ1IjoicGlwcG9jYWwiLCJhIjoiY2xka28zdWVjMHBkZzNwbnoyMmlxYjA3MyJ9.9D5EB0SWydvAQZr-SdI64Q' diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e1dca23 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM arm64v8/node:latest + +RUN apt update +#RUN apt upgrade -y +RUN apt install nano + +RUN git clone https://github.com/ruisaraiva19/favycon.git +WORKDIR /favycon +RUN yarn install +RUN yarn build +CMD ["yarn","start"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..4503039 --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# GPX Studio nuovo + +[original githuh](https://github.com/gpxstudio/gpx.studio) + +## installazione + +modificare il file .env inserendo la key per mapbox + +eseguire + + ./build.sh + +far partire + + sudo docker run -d --name gpxstudionew -e PUID=1000 -e PGID=1000 -e TZ=Europe/Rome -p 8111:8111 --restart unless-stopped gpxstudionew:latest + +oppure tramite portainer o compose + + services: + gpxstudionew: + container_name: gpxstudionew + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Rome + ports: + - 8111:8111 + restart: unless-stopped + image: gpxstudionew:latest + +## Prove + +utilizzare questi comandi + +[comandi manuali](./Manual_Command.md) + +## Inserimento delle favicon (procedimento utilizzato) + +è stato utilizzato questo sito [favicon generator](https://www.favicon-generator.org/) + +il file icon contiene i link generati con favicon generator + + COPY icon /gpxstudio/website + +e' stato variato l'indirizzamento al folder corretto usando nel path la variabile + + %sveltekit.assets% + +in fase di build vengono inseriti i link alle icone nel file website/src/app.thml + + sed -i '/link rel/r icon' src/app.html + + e tutte le icone generate sono nel folder favicon e vengono copiate in website/static + + COPY ./favicon /gpxstudio/website/static + +in manifest.json (in favicon folder) viene inserito il nome della app + +## Inserimento del server di routing oltre all'host per il docker (0.0.0.0) e la porta di comunicazione + +in Dockerfile c'è l'inserimento del server di routing che in questo caso è brouter.patachina.it + + sed -i 's/routing.gpx.studio/brouter.patachina.it/g' ./src/lib/components/toolbar/tools/routing/Routing.ts + +in website/packaging.json si inserisce l'host 0.0.0.0 di default per poter camunicare con l'esterno del docker e la porta (in questo caso 8111) + + sed -i 's/vite dev/vite dev --host 0.0.0.0 --port 8111/g' package.json + sed -i 's/vite preview/vite preview --host 0.0.0.0 --port 8111/g' package.json + diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..5dfc8f3 --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +sudo docker build -t favicon --no-cache . diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6b0256d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + favicon: + ports: + - 8112:3000 + container_name: favicon + image: favicon + restart: unless-stopped diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..bca6332 --- /dev/null +++ b/start.sh @@ -0,0 +1,2 @@ +#!/bin/sh +sudo docker run -d -p 8112:3000 --name favicon favicon