mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
parent
897704fab3
commit
36eed1e091
25
README.md
25
README.md
@ -163,6 +163,20 @@ front-end.
|
|||||||
|
|
||||||
### From source
|
### From source
|
||||||
|
|
||||||
|
To compile the project, you'll need:
|
||||||
|
|
||||||
|
* npm, curl: `sudo apt install curl npm`
|
||||||
|
* Rust/Cargo: [rustup.rs](https://rustup.rs/)
|
||||||
|
|
||||||
|
Then you can compile the server (and the migration tool if you want):
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cargo build --release -p lldap -p migration-tool
|
||||||
|
```
|
||||||
|
|
||||||
|
The resulting binaries will be in `./target/release/`. Alternatively, you can
|
||||||
|
just run `cargo run -- run` to run the server.
|
||||||
|
|
||||||
To bring up the server, you'll need to compile the frontend. In addition to
|
To bring up the server, you'll need to compile the frontend. In addition to
|
||||||
cargo, you'll need:
|
cargo, you'll need:
|
||||||
|
|
||||||
@ -172,10 +186,13 @@ cargo, you'll need:
|
|||||||
Then you can build the frontend files with `./app/build.sh` (you'll need to run
|
Then you can build the frontend files with `./app/build.sh` (you'll need to run
|
||||||
this after every front-end change to update the WASM package served).
|
this after every front-end change to update the WASM package served).
|
||||||
|
|
||||||
To bring up the server, just run `cargo run`. The default config is in
|
The default config is in `src/infra/configuration.rs`, but you can override it
|
||||||
`src/infra/configuration.rs`, but you can override it by creating an
|
by creating an `lldap_config.toml`, setting environment variables or passing
|
||||||
`lldap_config.toml`, setting environment variables or passing arguments to
|
arguments to `cargo run`. Have a look at the docker template:
|
||||||
`cargo run`.
|
`lldap_config.docker_template.toml`.
|
||||||
|
|
||||||
|
You can also install it as a systemd service, see
|
||||||
|
[lldap.service](example_configs/lldap.service).
|
||||||
|
|
||||||
### Cross-compilation
|
### Cross-compilation
|
||||||
|
|
||||||
|
22
example_configs/lldap.service
Normal file
22
example_configs/lldap.service
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Nitnelave LLDAP
|
||||||
|
Documentation=https://github.com/nitnelave/lldap
|
||||||
|
|
||||||
|
# Only sqlite
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# The user/group LLDAP is run under. The working directory (see below) should allow write and read access to this user/group.
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
|
||||||
|
# The location of the compiled binary
|
||||||
|
ExecStart=/opt/nitnelave/lldap \
|
||||||
|
run
|
||||||
|
|
||||||
|
# Only allow writes to the following directory and set it to the working directory (user and password data are stored here).
|
||||||
|
WorkingDirectory=/opt/nitnelave/
|
||||||
|
ReadWriteDirectories=/opt/nitnelave/
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user