|
|
@ -30,9 +30,9 @@ The platform, publish URL, and token file can be changed in `.goreleaser.yml`: |
|
|
|
|
|
|
|
```yml |
|
|
|
env_files: |
|
|
|
gitea_token: ~/.config/goreleaser/gitea_token |
|
|
|
gitea_token: ~/.config/goreleaser/gitea_token |
|
|
|
gitea_urls: |
|
|
|
api: https://try.gitea.io/api/v1/ |
|
|
|
api: https://try.gitea.io/api/v1/ |
|
|
|
``` |
|
|
|
|
|
|
|
#### Manually |
|
|
@ -67,9 +67,9 @@ GOOS=linux GOARCH=arm64 go build -mod=vendor -o dist/goserv-linux-arm64 . |
|
|
|
|
|
|
|
The example files are located in `./examples` |
|
|
|
|
|
|
|
- Caddyfile (web server config) |
|
|
|
- .env (environment variables) |
|
|
|
- build.sh |
|
|
|
- Caddyfile (web server config) |
|
|
|
- .env (environment variables) |
|
|
|
- build.sh |
|
|
|
|
|
|
|
```bash |
|
|
|
export BASE_URL=https://example.com |
|
|
@ -123,6 +123,8 @@ Authentication: Bearer <token> |
|
|
|
|
|
|
|
Here's the API, in brief: |
|
|
|
|
|
|
|
Base URL looks like `https://example.com/api`. |
|
|
|
|
|
|
|
```txt |
|
|
|
# Demo Mode Only |
|
|
|
DELETE /public/reset Drop database and re-initialize |
|
|
@ -166,9 +168,9 @@ If the documentation is not public hosted you can view it with GoDoc: |
|
|
|
godoc --http :6060 |
|
|
|
``` |
|
|
|
|
|
|
|
- <http://localhost:6060/pkg/git.example.com/example/goserv/> |
|
|
|
- <http://localhost:6060/pkg/git.example.com/example/goserv/internal/api> |
|
|
|
- <http://localhost:6060/pkg/git.example.com/example/goserv/internal/db> |
|
|
|
- <http://localhost:6060/pkg/git.example.com/example/goserv/> |
|
|
|
- <http://localhost:6060/pkg/git.example.com/example/goserv/internal/api> |
|
|
|
- <http://localhost:6060/pkg/git.example.com/example/goserv/internal/db> |
|
|
|
|
|
|
|
You can see abbreviated documentation with `go`'s built-in `doc`, for example: |
|
|
|
|
|
|
@ -198,10 +200,10 @@ go test -mod=vendor ./... |
|
|
|
This setup can be run on a VPS, such as Digital Ocean, OVH, or Scaleway |
|
|
|
for \$5/month with minimal dependencies: |
|
|
|
|
|
|
|
- VPS |
|
|
|
- Caddy |
|
|
|
- PostgreSQL |
|
|
|
- Serviceman |
|
|
|
- VPS |
|
|
|
- Caddy |
|
|
|
- PostgreSQL |
|
|
|
- Serviceman |
|
|
|
|
|
|
|
**Mac**, **Linux**: |
|
|
|
|
|
|
@ -281,8 +283,8 @@ Copyright 2020 The GoServ Authors. All rights reserved. |
|
|
|
|
|
|
|
### Exceptions |
|
|
|
|
|
|
|
- `countries.json` LGPL, taken from <https://github.com/stefangabos/world_countries> |
|
|
|
- `flags.json` MIT, taken from <https://github.com/matiassingers/emoji-flags> |
|
|
|
- `countries.json` LGPL, taken from <https://github.com/stefangabos/world_countries> |
|
|
|
- `flags.json` MIT, taken from <https://github.com/matiassingers/emoji-flags> |
|
|
|
|
|
|
|
These are probably also in the Public Domain. \ |
|
|
|
(gathering the official data from any source would yield the same dataset) |
|
|
|