All checks were successful
Build and Push Docker Image to GHCR / build-and-push (push) Successful in 1h19m23s
This commit includes many bug fixes and improvements to the admin UI. More errors are caught and displayed to the user. Submit buttons now display a loading state while the request is being processed. Several inconsistencies and style issues in the admin UI have been fixed. Image upload inputs now have an accurate accept attribute, so tat users cannot upload images that are unsupported. Finally, in development mode, the page is outlined in dashed yello to help me not go insane when I forget that I'm using the deployed site and thats why my changes arent doing anything, and the API returns 400 errors when images are unsupported formats.
101 lines
4.8 KiB
Markdown
101 lines
4.8 KiB
Markdown
# Passport
|
|
|
|
Passport is a simple, fast, and lightweight web dashboard/new tab replacement.
|
|
|
|
> "I cant believe I've never broken it" - me
|
|
|
|
## Getting Started
|
|
|
|

|
|
|
|
### Prerequisites
|
|
|
|
- [ZQDGR](https://github.com/juls0730/zqdgr)
|
|
- [Go](https://go.dev/doc/install)
|
|
- [sqlite3](https://www.sqlite.org/download.html)
|
|
- [TailwdinCSS CLI](https://github.com/tailwindlabs/tailwindcss/releases/latest)
|
|
|
|
## Usage
|
|
|
|
### Docker
|
|
|
|
Passport is available as a Docker image via this repository for both amd64 and arm64. This is the recommended way to run Passport.
|
|
|
|
```bash
|
|
docker run -d --name passport -p 3000:3000 -v passport_data:/data -e PASSPORT_ADMIN_USERNAME=admin -e PASSPORT_ADMIN_PASSWORD=password ghcr.io/juls0730/passport:latest
|
|
```
|
|
|
|
Make sure to change the admin password to something secure. At `/data` is where all of passport's persistent data will be stored, such as image uploads and the sqlite database.
|
|
|
|
### Building from source
|
|
|
|
If you want to build from source, you will need to install the dependencies first.
|
|
|
|
```bash
|
|
# note entirely necessary, but strongly recommended
|
|
go install github.com/juls0730/zqdgr@latest
|
|
|
|
# install bun
|
|
curl -fsSL https://bun.sh/install | bash
|
|
|
|
# install css build deps
|
|
bun install
|
|
|
|
# you may also have to install sqlite3...
|
|
```
|
|
|
|
Then you can build the binary.
|
|
|
|
```bash
|
|
zqdgr build
|
|
```
|
|
|
|
You can then run the binary.
|
|
|
|
### Configuration
|
|
|
|
#### Passport configuration
|
|
|
|
| Environment Variable | Description | Required | Default |
|
|
| -------------------------------------- | ------------------------------------------------------------------------------- | -------- | ------- |
|
|
| `PASSPORT_DEV_MODE` | Enables dev mode | false | false |
|
|
| `PASSPORT_ENABLE_PREFORK` | Enables preforking | false | false |
|
|
| `PASSPORT_ADMIN_USERNAME` | The username for the admin dashboard | true |
|
|
| `PASSPORT_ADMIN_PASSWORD` | The password for the admin dashboard | true |
|
|
| `PASSPORT_SEARCH_PROVIDER` | The search provider to use for the search bar, without any query parameters | true |
|
|
| `PASSPORT_SEARCH_PROVIDER_QUERY_PARAM` | The query parameter to use for the search provider, e.g. `q` for most providers | false | q |
|
|
|
|
> [!NOTE]
|
|
> Currently passport only supports search using a GET request.
|
|
|
|
#### Weather configuration
|
|
|
|
The weather integration is optional, and will be enabled automatically if you provide an API key. The following only applies if you are using the OpenWeatherMap integration.
|
|
|
|
| Environment Variable | Description | Required | Default |
|
|
| -------------------------- | ------------------------------------------------------------------------- | -------- | -------------- |
|
|
| `PASSPORT_WEATHER_API_KEY` | The OpenWeather API key | true | |
|
|
| `WEATHER_PROVIDER` | The weather provider to use, currently only `openweathermap` is supported | false | openweathermap |
|
|
| `WEATHER_TEMP_UNITS` | The temperature units to use, either `metric` or `imperial` | false | metric |
|
|
| `WEATHER_LAT` | The latitude of your location | true | |
|
|
| `WEATHER_LON` | The longitude of your location | true | |
|
|
| `WEATHER_UPDATE_INTERVAL` | The interval in minutes to update the weather data | false | 15 |
|
|
|
|
#### Uptime configuration
|
|
|
|
The uptime integration is optional, and will be enabled automatically if you provide an API key. The following only applies if you are using the UptimeRobot integration.
|
|
|
|
| Environment Variable | Description | Required | Default |
|
|
| ------------------------- | ------------------------------------------------- | -------- | ------- |
|
|
| `PASSPORT_UPTIME_API_KEY` | The UptimeRobot API key | true | |
|
|
| `UPTIME_UPDATE_INTERVAL` | The interval in seconds to update the uptime data | false | 300 |
|
|
|
|
### Adding links and categories
|
|
|
|
The admin dashboard can be accessed at `/admin`, you will be redirected to the login page if you are not logged in, use
|
|
the credentials you configured via the environment variables to login. Once logged in you can add links and categories.
|
|
|
|
## License
|
|
|
|
This project is licensed under the BSL-1.0 License - see the [LICENSE](LICENSE) file for details
|