-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,41 @@ | ||
# Librarian | ||
|
||
[![](https://img.shields.io/github/v/release/tuihub/librarian.svg)](https://github.com/tuihub/librarian/releases/latest) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/tuihub/librarian)](https://goreportcard.com/report/github.com/tuihub/librarian) | ||
[![golangci-lint](https://github.com/TuiHub/Librarian/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/TuiHub/Librarian/actions/workflows/golangci-lint.yml) | ||
[![codecov](https://codecov.io/gh/TuiHub/Librarian/branch/master/graph/badge.svg?token=9E9VIBWYZV)](https://codecov.io/gh/TuiHub/Librarian) | ||
|
||
## DEVELOPER TESTING | ||
Librarian is the standard server implementation of TuiHub. | ||
|
||
Current version is for developer testing only. It's not ready for user. Don't run it on your computer. | ||
It is recommended to use with the standard client implementation [Waiter](https://github.com/tuihub/waiter). Check [document](https://docs.tuihub.org) site for user guide. | ||
|
||
## Usage | ||
|
||
### Server binary | ||
|
||
Build the server with `make`, | ||
or download the binary file in [releases](https://github.com/tuihub/librarian/releases) page. | ||
|
||
### Config file | ||
|
||
Config file is required. The config template is provided in [configs](configs) | ||
|
||
### Command line arguments | ||
|
||
- `config` path, required, eg: --conf config.yaml | ||
- `data` path, required, eg: --data /opt/librarian/data | ||
|
||
### Environment variables | ||
|
||
- `LOG_LEVEL`, accept `debug`, `info`, `warn`, `error` | ||
- `DEMO_MODE`, accept `true`, `false`, server will reject any changes on admin user when demo mode is enabled | ||
- `CREATE_ADMIN_USER`, accept a string | ||
- `CREATE_ADMIN_PASS`, accept a string, server will create the given admin user on startup | ||
|
||
## Development | ||
|
||
1. Install [Go](https://golang.org/) | ||
2. (Optional) Install [Docker](https://docs.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) | ||
3. (Optional) Deploy dependencies with [tests/docker-compose.yml](tests/docker-compose.yml) | ||
4. Create the config file at [configs/config.yaml](configs/config.yaml) with templates. | ||
5. Run `make run` to start the server |