2023-10-10 22:26:07 +02:00
|
|
|
---
|
|
|
|
gitea: none
|
|
|
|
include_toc: true
|
|
|
|
---
|
|
|
|
|
2023-09-15 23:45:28 +02:00
|
|
|
# Install YetAnotherToDoList
|
|
|
|
|
2023-10-24 22:29:07 +02:00
|
|
|
It is recommended to use this behind a proxy (e.g.
|
|
|
|
[Apache/httpd](https://httpd.apache.org/) or [NGINX](https://nginx.org/)) to add
|
|
|
|
TLS and [Gzip](https://www.gnu.org/software/gzip/)/[brotli](https://brotli.org/)
|
|
|
|
compression.
|
|
|
|
|
2023-10-10 22:26:07 +02:00
|
|
|
## Requirements:
|
|
|
|
|
2023-11-17 15:47:25 +01:00
|
|
|
- go 1.21.0+
|
2023-10-20 13:59:19 +02:00
|
|
|
- gcc 4.6+ (according to the
|
|
|
|
[golang wiki](https://github.com/golang/go/wiki/MinimumRequirements#cgo))
|
2023-10-10 22:26:07 +02:00
|
|
|
|
2023-09-15 23:45:28 +02:00
|
|
|
## Install via `go install`
|
|
|
|
|
2023-10-24 22:29:07 +02:00
|
|
|
When installing via this method, no commit & version information is provided and
|
|
|
|
there will be no frontend.
|
2023-09-15 23:45:28 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
go install somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList@latest
|
|
|
|
```
|
|
|
|
|
2023-10-20 13:59:19 +02:00
|
|
|
You can specify the installation location by adding
|
|
|
|
`GOBIN=<installation directory>`
|
2023-09-15 23:45:28 +02:00
|
|
|
|
2023-10-10 22:26:07 +02:00
|
|
|
## Install from git repository (Recommended)
|
2023-09-15 23:45:28 +02:00
|
|
|
|
2023-10-24 16:51:58 +02:00
|
|
|
In addition to the [requirements](#requirements), you will need `git`,
|
|
|
|
`GNU make`, and `pnpm`.
|
2023-09-15 23:45:28 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://somepi.ddns.net/gitea/gilex-dev/YetAnotherToDoList.git
|
|
|
|
cd YetAnotherToDoList
|
2023-10-10 22:26:07 +02:00
|
|
|
go mod tidy # only if you want to edit the GraphQL backend
|
2023-10-24 22:29:07 +02:00
|
|
|
make frontend # omit if you want to run headless
|
2023-09-15 23:45:28 +02:00
|
|
|
make build
|
|
|
|
```
|
|
|
|
|
2023-10-10 22:26:07 +02:00
|
|
|
To customize your build, you can run `make` with these environment variables:
|
2023-09-15 23:45:28 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
INSTALL_DIR=<installation directory>
|
|
|
|
BUILD_FLAGS=<go build flags>
|
|
|
|
RUN_FLAGS=<cli arguments for YetAnotherToDoList>
|
|
|
|
```
|
|
|
|
|
2023-10-24 22:29:07 +02:00
|
|
|
You also pass `build tags` to `BUILD_FLAGS`, e.g.
|
|
|
|
`BUILD_FLAGS="-tags headless,dev"` to disable the frontend and enable
|
|
|
|
`GraphiQL`.
|
|
|
|
|
|
|
|
While there is a `tools` build constraint/tag, building with it has no effect.
|
|
|
|
The `tools` package only exists to install the dependencies for the
|
|
|
|
`gqlgen generate` command when you run `go mod tidy`.
|
|
|
|
|
2023-09-15 23:45:28 +02:00
|
|
|
## Install from pre-build binary
|
|
|
|
|
|
|
|
There are currently no pre-build binaries available
|
|
|
|
|
2023-10-10 22:26:07 +02:00
|
|
|
## Troubleshooting
|
|
|
|
|
2023-10-20 13:59:19 +02:00
|
|
|
If you get an error like
|
|
|
|
`Unable to connect: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub`,
|
|
|
|
make sure `gcc` is installed and in your `PATH`.
|
2023-10-10 22:26:07 +02:00
|
|
|
|
|
|
|
If this still does not work, try
|
|
|
|
|
|
|
|
```bash
|
|
|
|
CGO_ENABLED=1 go install github.com/mattn/go-sqlite3
|
|
|
|
```
|
|
|
|
|
|
|
|
## Post install
|
|
|
|
|
|
|
|
### Add shell completion
|
2023-09-15 23:45:28 +02:00
|
|
|
|
|
|
|
YetAnotherToDoList must be in your `PATH` for this to work.
|
|
|
|
|
2023-10-10 22:26:07 +02:00
|
|
|
#### Bash
|
2023-09-15 23:45:28 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
source <(YetAnotherToDoList completion bash)
|
|
|
|
```
|
|
|
|
|
2023-10-10 22:26:07 +02:00
|
|
|
For other shells or more info, see
|
|
|
|
|
|
|
|
```bash
|
|
|
|
YetAnotherToDoList help completion <bash|zsh|fish|powershell>
|
|
|
|
```
|
|
|
|
|
|
|
|
### Configuration
|
|
|
|
|
2023-10-20 13:59:19 +02:00
|
|
|
Edit the file [.YetAnotherToDoList.yaml](./.YetAnotherToDoList.yaml) and run
|
|
|
|
`YetAnotherToDoList help` for options.
|
2023-09-15 23:45:28 +02:00
|
|
|
|
|
|
|
## Uninstall
|
|
|
|
|
|
|
|
Run `make uninstall` or
|
|
|
|
|
|
|
|
```bash
|
|
|
|
rm $HOME/.local/bin/YetAnotherToDoList # replace with your installation path
|
|
|
|
```
|
|
|
|
|
2023-10-20 13:59:19 +02:00
|
|
|
Don't forget to delete the `.log`, `.yaml` and `.sqlite3` files if you don't
|
|
|
|
need them any more.
|
2023-09-15 23:45:28 +02:00
|
|
|
|
|
|
|
### Remove shell completion
|
|
|
|
|
|
|
|
#### Bash
|
|
|
|
|
|
|
|
```bash
|
|
|
|
complete -r YetAnotherToDoList
|
|
|
|
```
|