diff options
author | Conrad Ludgate <conradludgate@gmail.com> | 2021-11-13 22:45:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-13 22:45:50 +0000 |
commit | 46a1dab132a7f5331458d0d8a5872d4c5e9c0ba7 (patch) | |
tree | 49d25bde2d6cdcba9d82956fc7564dd3e0e58466 | |
parent | 8f91b1410c2bc67e6b3da8a1927da31a9dfb09ab (diff) |
fix: dockerfile with correct glibc (#198)
* fix: dockerfile with correct glibc
* chore: update server docs
-rw-r--r-- | Dockerfile | 17 | ||||
-rw-r--r-- | docs/server.md | 39 |
2 files changed, 41 insertions, 15 deletions
@@ -1,23 +1,18 @@ -FROM lukemathwalker/cargo-chef as planner +FROM lukemathwalker/cargo-chef:latest-rust-1.56.1 AS chef WORKDIR app + +FROM chef AS planner COPY . . -RUN cargo chef prepare --recipe-path recipe.json +RUN cargo chef prepare --recipe-path recipe.json -FROM lukemathwalker/cargo-chef as cacher -WORKDIR app +FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json -FROM rust as builder -WORKDIR app COPY . . -# Copy over the cached dependencies -COPY --from=cacher /app/target target -COPY --from=cacher $CARGO_HOME $CARGO_HOME RUN cargo build --release --bin atuin -FROM debian:buster-slim as runtime - +FROM debian:bullseye-20211011-slim AS runtime WORKDIR app ENV TZ=Etc/UTC diff --git a/docs/server.md b/docs/server.md index 445aacdd..650934b5 100644 --- a/docs/server.md +++ b/docs/server.md @@ -19,19 +19,50 @@ OPTIONS: -p, --port <port> ``` +## Configuration + The config for the server is kept separate from the config for the client, even though they are the same binary. Server config can be found at `~/.config/atuin/server.toml`. It looks something like this: -``` +```toml host = "0.0.0.0" port = 8888 open_registration = true db_uri="postgres://user:password@hostname/database" ``` -`open_registration` sets whether the server allows new user registrations. Set -this to false after making your own account if you don't want others to be able -to use your server. +Alternatively, configuration can also be provided with environment variables. + +```sh +ATUIN_HOST="0.0.0.0" +ATUIN_PORT=8888 +ATUIN_OPEN_REGISTRATION=true +ATUIN_DB_URI="postgres://user:password@hostname/database" +``` + +### host + +The host address the atuin server should listen on. + +Defaults to `127.0.0.1`. + +### port + +The post the atuin server should listen on. + +Defaults to `8888`. + +### open_registration + +If `true`, atuin will accept new user registrations. +Set this to `false` after making your own account if you don't want others to be +able to use your server. + +Defaults to `false`. + +### db_uri + +A valid postgres URI, where the user and history data will be saved to. |