forked from github-mirrorer/taskchampion-sync-server
Finish building Postgres support (#133)
This includes: - Building a Docker image for Postgres as well as SQLite - Fuller instructions for usage of the package, including the Postgres builds. A few related things changed here: - `.env` is not used anymore -- the defaults in the Dockerfiles are sufficient - The Rust version in the Dockerfiles is increased to match the MSRV, and with it the Alpine version bumped to one built with that Rust version. - Cargo dependencies on native-tls and openssl updated to include only the `vendored` feature, so as not to require a system openssl installation. - Two GitHub jobs are set up, to build the two different Docker images - The documentation incorrectly suggested using `DELETE .. CASCADE` to delete clients. This syntax does not exist, as the cascading delete is configured in the schema.
This commit is contained in:
committed by
GitHub
parent
820aaf363c
commit
ab6df362bf
49
docs/src/usage/binaries.md
Normal file
49
docs/src/usage/binaries.md
Normal file
@ -0,0 +1,49 @@
|
||||
# Binaries
|
||||
|
||||
Taskchampion-sync-server is a single binary that serves HTTP requests on a TCP
|
||||
port. The server does not implement TLS; for public deployments, the
|
||||
recommendation is to use a reverse proxy such as Nginx, haproxy, or Apache
|
||||
httpd.
|
||||
|
||||
One binary is provided for each storage backend:
|
||||
|
||||
- `taskchampion-sync-server` (SQLite)
|
||||
- `taskchampion-sync-server-postgres` (Postgres)
|
||||
|
||||
### Running the Binary
|
||||
|
||||
The server is configured with command-line options or environment variables.
|
||||
See the `--help` output for full details.
|
||||
|
||||
For the SQLite binary, the `--data-dir` option or `DATA_DIR` environment
|
||||
variable specifies where the server should store its data. For the Postgres
|
||||
binary, the `--connection` option or `CONNECTION` environment variable
|
||||
specifies the connection information, in the form of a [LibPQ-style connection
|
||||
URI](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS).
|
||||
The remaining options are common to all binaries.
|
||||
|
||||
The `--listen` option specifies the interface and port the server listens on.
|
||||
It must contain an IP-Address or a DNS name and a port number. This option is
|
||||
mandatory, but can be repeated to specify multiple interfaces or ports. This
|
||||
value can be specified in environment variable `LISTEN`, as a comma-separated
|
||||
list of values.
|
||||
|
||||
By default, the server will allow all clients and create them in the database
|
||||
on first contact. There are two ways to limit the clients the server will
|
||||
interact with:
|
||||
|
||||
- To limit the accepted client IDs, specify them in the environment variable
|
||||
`CLIENT_ID`, as a comma-separated list of UUIDs. Client IDs can be specified
|
||||
with `--allow-client-id`, but this should not be used on shared systems, as
|
||||
command line arguments are visible to all users on the system. This convenient
|
||||
option is suitable for personal and small-scale deployments.
|
||||
|
||||
- To disable the automatic creation of clients, use the `--no-create-clients`
|
||||
flag or the `CREATE_CLIENTS=false` environment variable. You are now
|
||||
responsible for creating clients in the database manually, so this option is
|
||||
more suitable for large scale deployments. See [Integration](../integration.md)
|
||||
for more information on such deployments.
|
||||
|
||||
The server only logs errors by default. To add additional logging output, set
|
||||
environment variable `RUST_LOG` to `info` to get a log message for every
|
||||
request, or to `debug` to get more verbose debugging output.
|
||||
Reference in New Issue
Block a user