# Build ezidam on Alpine Linux ## Setup Install alpine. Enable `community` repository in `/etc/apk/repositories` Install packages: ```sh apk add rustup git build-base ``` Run `rustup-init` to download the rust compiler. ## Build Get code, get in repo ```sh rm rust-toolchain.toml cargo build --release ``` ## Copy Create folders for config, assets, database ```sh mkdir -p /etc/ezidam /usr/share/ezidam /var/lib/ezidam ``` Copy binary, config, assets ```sh cp target/release/ezidam /usr/bin/ezidam cp crates/ezidam/ezidam.toml /etc/ezidam/ezidam.toml cp crates/ezidam/static/ crates/ezidam/templates/ /usr/share/ezidam/ -rv ``` ## Config Here's the paths to use in `/etc/ezidam/ezidam.toml`: ```toml [default] template_dir = "/usr/share/ezidam/templates" static_dir = "/usr/share/ezidam/static" [default.databases.ezidam] url = "/var/lib/ezidam/ezidam.sqlite" ``` Don't forget the rest of the config! The above is only a snippet! ## Service Copy the script `openrc.sh` as `/etc/init.d/ezidam`, then ```sh chmod +x /etc/init.d/ezidam ``` ## Start/Stop/Boot - Start: `rc-service ezidam start` - Stop: `rc-service ezidam stop` - Start at boot: `rc-update add ezidam` - Don't start at boot: `rc-update del ezidam` ## Logs If ezidam is started with the service, logs will be available at `/var/log/ezidam.{log,err}`