update legacy docs
This commit is contained in:
parent
af6e73031e
commit
1ad9125716
@ -1,20 +1,2 @@
|
|||||||
TRIP uses a SQLite database to store the data.
|
> [!CAUTION]
|
||||||
|
> This documentation is now available at [https://itskovacs.github.io/trip/docs/misc/backup](https://itskovacs.github.io/trip/docs/misc/backup)
|
||||||
To back up your data, follow these simple steps:
|
|
||||||
1. **Stop the container**
|
|
||||||
```bash
|
|
||||||
# Look for TRIP container
|
|
||||||
$ docker ps
|
|
||||||
|
|
||||||
$ docker stop <trip_container_id>
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Copy the SQLite database file**
|
|
||||||
```bash
|
|
||||||
$ cp /path/to/trip/storage/trip.sqlite /path/to/backups/trip.sqlite.bak
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Restart the container**
|
|
||||||
|
|
||||||
> [!TIP]
|
|
||||||
> To restore your data, simply copy the `trip.sqlite` file back into the `storage` directory.
|
|
||||||
109
docs/config.md
109
docs/config.md
@ -1,109 +1,2 @@
|
|||||||
|
|
||||||
You can modify the configuration by setting values in the `storage/config.yml` file.
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> The `config.yml` file is not created automatically because the server uses default values.
|
|
||||||
> After editing `config.yml`, restart the container for the changes to take effect.
|
|
||||||
|
|
||||||
> [!TIP]
|
|
||||||
> Setting environment variable in `docker-compose.yml` also work.
|
|
||||||
|
|
||||||
|
|
||||||
### Change Token duration
|
|
||||||
|
|
||||||
To modify the token lifespan, edit `ACCESS_TOKEN_EXPIRE_MINUTES` for the *Access Token* and `REFRESH_TOKEN_EXPIRE_MINUTES` for the *Refresh Token*.
|
|
||||||
By default, the *Refresh Token* expires after `1440` minutes (24 hours), and the *Access Token* after `30` minutes.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
ACCESS_TOKEN_EXPIRE_MINUTES=30
|
|
||||||
REFRESH_TOKEN_EXPIRE_MINUTES=1440
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Configure OIDC Auth
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
OIDC_DISCOVERY_URL="https://sso.yourdomain.lan/.well-known/openid-configuration"
|
|
||||||
OIDC_CLIENT_ID="your-client-id"
|
|
||||||
OIDC_CLIENT_SECRET="your-client-secret"
|
|
||||||
OIDC_REDIRECT_URI="https://trip.yourdomain.lan/auth"
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> You might face a `SSLError` / `CERTIFICATE_VERIFY_FAILED`. I invite you to check [Troubleshoot SSL Error](#tbshoot-cert) section
|
> This documentation is now available at [https://itskovacs.github.io/trip/docs/getting-started/configuration](https://itskovacs.github.io/trip/docs/getting-started/configuration)
|
||||||
|
|
||||||
|
|
||||||
### Disable registration
|
|
||||||
|
|
||||||
The key `REGISTER_ENABLE` can be configured to `false` if you want to disable registration.
|
|
||||||
|
|
||||||
**To disable**, add this in your `config.yml`:
|
|
||||||
```yaml
|
|
||||||
REGISTER_ENABLE=false
|
|
||||||
```
|
|
||||||
|
|
||||||
### Modify Image default size
|
|
||||||
|
|
||||||
By default, images are resized to `500px` for places and `600px` for trips. You can override these default values by setting them in the `config.yml`:
|
|
||||||
|
|
||||||
> [!CAUTION]
|
|
||||||
> Higher numbers will lead to higher disk usage.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
PLACE_IMAGE_SIZE=500
|
|
||||||
TRIP_IMAGE_SIZE=600
|
|
||||||
```
|
|
||||||
|
|
||||||
### Change default values
|
|
||||||
|
|
||||||
You can configure the default values for new users with the following settings: `DEFAULT_TILE`, `DEFAULT_CURRENCY`, `DEFAULT_MAP_LAT`, `DEFAULT_MAP_LNG`.
|
|
||||||
|
|
||||||
> [!IMPORTANT]
|
|
||||||
> Changing these values does not update settings for existing users, it only affects new users.
|
|
||||||
|
|
||||||
|
|
||||||
### Troubleshoot SSL Error / Certificate <a name = "tbshoot-cert"></a>
|
|
||||||
|
|
||||||
One way to check if you're concerned by this is simply doing the following and checking the result:
|
|
||||||
```dockerfile
|
|
||||||
$ docker run --rm -it ghcr.io/itskovacs/trip:1 /bin/bash
|
|
||||||
$ python3
|
|
||||||
>>> import httpx
|
|
||||||
>>> httpx.get("https://sso.yourdomain.lan/")
|
|
||||||
```
|
|
||||||
|
|
||||||
In case you're facing this issue, it's likely due to the fact that the container does not trust you custom certificate.
|
|
||||||
|
|
||||||
To fix this, I recommend you to build your own image with the certificate, based on the latest package.
|
|
||||||
|
|
||||||
Pull the latest TRIP image.
|
|
||||||
```bash
|
|
||||||
docker pull ghcr.io/itskovacs/trip:1
|
|
||||||
```
|
|
||||||
|
|
||||||
Create a file named `Dockerfile` in your TRIP directory to copy your CA certificate in a custom TRIP image.
|
|
||||||
```
|
|
||||||
# Use latest TRIP image
|
|
||||||
FROM ghcr.io/itskovacs/trip:1
|
|
||||||
|
|
||||||
# Copy your CA certificate file in the image. Replace myCA.crt with your certificate name.
|
|
||||||
COPY myCA.crt /usr/local/share/ca-certificates/
|
|
||||||
RUN update-ca-certificates
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, simply build the image:
|
|
||||||
```bash
|
|
||||||
docker build -t trip-custom-cert .
|
|
||||||
```
|
|
||||||
|
|
||||||
When you want to run TRIP, you just have to use your newly created image `trip-custom-cert`:
|
|
||||||
```bash
|
|
||||||
docker run -p 8080:8000 -v ./storage:/app/storage trip-custom-cert
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!IMPORTANT]
|
|
||||||
> On TRIP update, simply re-create your custom image:
|
|
||||||
> ```
|
|
||||||
> docker pull ghcr.io/itskovacs/trip:1
|
|
||||||
> docker build -t trip-custom-cert .
|
|
||||||
> ```
|
|
||||||
@ -1,93 +1,2 @@
|
|||||||
# 🗺️ Installing TRIP on Synology NAS Using Docker and Portainer
|
> [!CAUTION]
|
||||||
|
> This documentation is now available at [https://itskovacs.github.io/trip/docs/misc/synology](https://itskovacs.github.io/trip/docs/misc/synology)
|
||||||
This guide explains how to deploy [TRIP](https://github.com/itskovacs/trip) on a Synology NAS using Docker and Portainer.
|
|
||||||
TRIP is a minimalist, privacy-first map and POI tracking app that is fully self-hostable.
|
|
||||||
|
|
||||||
## 🧰 Prerequisites
|
|
||||||
|
|
||||||
- A Synology NAS with Docker support
|
|
||||||
- [Docker](https://www.synology.com/en-us/dsm/packages/Docker) installed via Synology Package Center
|
|
||||||
- [Portainer](https://www.portainer.io/) (Community Edition) installed and running
|
|
||||||
- Basic familiarity with Synology DSM, Portainer, and local network setup
|
|
||||||
|
|
||||||
|
|
||||||
## 📁 Step 1: Create a Storage Directory
|
|
||||||
|
|
||||||
Create a folder on your NAS to persist TRIP’s storage:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mkdir -p /volume1/docker/trip-storage
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also do this via File Station by creating:
|
|
||||||
|
|
||||||
```
|
|
||||||
/volume1/docker/trip-storage
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## 🚀 Step 2: Deploy TRIP in Portainer
|
|
||||||
|
|
||||||
### ✅ Option A: Docker Compose (Recommended)
|
|
||||||
|
|
||||||
1. Open **Portainer**.
|
|
||||||
2. Go to **Stacks** → **Add Stack**.
|
|
||||||
3. Name your stack (e.g., `trip`).
|
|
||||||
4. Paste the following:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
version: '3.9'
|
|
||||||
services:
|
|
||||||
trip:
|
|
||||||
container_name: trip
|
|
||||||
image: ghcr.io/itskovacs/trip:1
|
|
||||||
user: 1000:1000 #change these values to match those of your synology setup PUID:PGID
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
volumes:
|
|
||||||
- /volume1/docker/trip-storage:/app/storage
|
|
||||||
restart: on-failure:5
|
|
||||||
ports:
|
|
||||||
- "8080:8000"
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Click **Deploy the stack**.
|
|
||||||
|
|
||||||
|
|
||||||
### ⚙️ Option B: Manual Container (Docker Run Equivalent)
|
|
||||||
|
|
||||||
1. In **Portainer**, go to **Containers** → **Add Container**.
|
|
||||||
2. Fill out the following fields:
|
|
||||||
|
|
||||||
- **Name**: `trip`
|
|
||||||
- **Image**: `ghcr.io/itskovacs/trip:1`
|
|
||||||
- **Port mapping**: `8080` → `8000`
|
|
||||||
- **Volume mapping**:
|
|
||||||
- Host: `/volume1/docker/trip-storage`
|
|
||||||
- Container: `/app/storage`
|
|
||||||
|
|
||||||
3. Click **Deploy the container**.
|
|
||||||
|
|
||||||
|
|
||||||
## 🌐 Step 3: Access the App
|
|
||||||
|
|
||||||
Open a browser and go to:
|
|
||||||
|
|
||||||
```
|
|
||||||
http://<YOUR_NAS_IP>:8080
|
|
||||||
```
|
|
||||||
|
|
||||||
You should see the TRIP web interface.
|
|
||||||
|
|
||||||
|
|
||||||
## ⚙️ Step 4: Add Optional Configuration (e.g., Authentication)
|
|
||||||
|
|
||||||
> For authentication, theming, and more, refer to:
|
|
||||||
> [TRIP Configuration Docs](https://github.com/itskovacs/trip#configuration)
|
|
||||||
|
|
||||||
TRIP supports advanced configuration via a `config.yml` file or using `environment variables`.
|
|
||||||
|
|
||||||
1. Modify configuration, two options:
|
|
||||||
* Modify (or create) your `config.yml` inside `/volume1/docker/trip-storage`,
|
|
||||||
* Modify the environment variables of your container
|
|
||||||
2. Restart container
|
|
||||||
@ -1,82 +1,2 @@
|
|||||||
## Settings
|
> [!CAUTION]
|
||||||
### Low Network Mode
|
> This documentation is now available at [https://itskovacs.github.io/trip/docs/map-tracker/introduction](https://itskovacs.github.io/trip/docs/map-tracker/introduction)
|
||||||
|
|
||||||
*Low Network Mode* is enabled by default. When enabled, the app displays the Category image instead of the Place image to reduce network usage. You can disable this mode in the settings if you prefer to load Place images directly.
|
|
||||||
|
|
||||||
|
|
||||||
## Place Creation
|
|
||||||
### Google Maps URL Parsing
|
|
||||||
|
|
||||||
You can paste a link from Google Maps into the `place` input when creating a Place.
|
|
||||||
|
|
||||||
It will automatically fill the `Name`, `Place`, `Latitude` and `Longitude` from the link.
|
|
||||||
|
|
||||||
Try it yourself with this URL: `https://www.google.com/maps/place/British+Museum/@51.5194166,-0.1295315,17z/data=!3m1!4b1!4m6!3m5!1s0x48761b323093d307:0x2fb199016d5642a7!8m2!3d51.5194133!4d-0.1269566`.
|
|
||||||
|
|
||||||
To have this, you can either *click* on a Point of Interest in Google Maps or *search* for one, then copy the URL.
|
|
||||||
|
|
||||||
|
|
||||||
### Batch Creation
|
|
||||||
Places can be created using the Batch creation dialog, that supports JSON (array required).
|
|
||||||
|
|
||||||
Example:
|
|
||||||
```
|
|
||||||
[
|
|
||||||
{ "category": "Culture", "name": "Car Museum", "lat": 12.12, "lng": 50.89, "place": "Auto History Museum" },
|
|
||||||
{ "category": "Nature & Outdoor", "name": "An amazing park", "lat": 50.12, "lng": 12.89, "place": "The Park", "image": "https://upload.wikimedia.org/wikipedia/commons/b/be/Random_pyramids.jpg" }
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Image links must include the file extension. URLs without it won't attach the image (the place is created, but no image).
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> Mandatory properties:
|
|
||||||
> ```
|
|
||||||
> "category": "Categoryn ame" (case-sensitive)
|
|
||||||
> "name": "The name"
|
|
||||||
> "lat": 0.00
|
|
||||||
> "lng": 0.00
|
|
||||||
> "place": "Your string"
|
|
||||||
> ```
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Optional properties:
|
|
||||||
> ```
|
|
||||||
> "image": "https://example.com/image.jpg"
|
|
||||||
> "allowdog": true/false
|
|
||||||
> "description": "A description for the place"
|
|
||||||
> "price": 0.00
|
|
||||||
> "duration": 0
|
|
||||||
> "favorite": true/false
|
|
||||||
> "visited": true/false
|
|
||||||
> "gpx": "gpx file content"
|
|
||||||
> ```
|
|
||||||
|
|
||||||
|
|
||||||
### LatLng Parsing
|
|
||||||
|
|
||||||
You can paste a LatLng coordinate into the `latitude` input when creating a Place.
|
|
||||||
|
|
||||||
Supported formats include examples like:
|
|
||||||
- `37.7749, -122.4194`
|
|
||||||
- `37.7749° N, 122.4194° W`
|
|
||||||
- `37°46'29.64" N, 122°25'9.84" W`
|
|
||||||
- `37°46.494' N, 122°25.164' W`
|
|
||||||
|
|
||||||
### Plus Code Parsing
|
|
||||||
|
|
||||||
You can paste a [Plus Code](https://maps.google.com/pluscodes/) into the `latitude` input when creating a Place.
|
|
||||||
|
|
||||||
Example: `849VCWC8+R9`
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> Only full Plus Codes are currently handled. The `+` sign is added after eight characters for full codes and after the four characters for short codes.
|
|
||||||
|
|
||||||
## Trip
|
|
||||||
|
|
||||||
### Display a day itinerary
|
|
||||||
|
|
||||||
In addition to displaying the full trip itinerary using the button above the table, you can view the itinerary for a single day by clicking on that day's name in the table.
|
|
||||||
|
|
||||||
This will show only the itinerary for the selected day.
|
|
||||||
Loading…
x
Reference in New Issue
Block a user