Add containerised build instructions
This commit is contained in:
17
README.md
17
README.md
@@ -23,6 +23,12 @@ Options:
|
||||
|
||||
## Building from source
|
||||
|
||||
When running from source, the config options above can be configured simply as environment variables.
|
||||
|
||||
Two options for building are offered. The first is easier.
|
||||
|
||||
### Build for local platform
|
||||
|
||||
1. Install build dependencies: `sudo apt install gcc gcc-multilib cmake ffmpeg libopus-dev pkg-config libssl-dev`
|
||||
2. Install database server: `sudo apt install mysql-server-8.0`. Create a database called `soundfx`
|
||||
3. Install Cargo and Rust from https://rustup.rs
|
||||
@@ -30,4 +36,13 @@ Options:
|
||||
5. From the source code directory, execute `sqlx migrate run`
|
||||
6. Build with cargo: `cargo build --release`
|
||||
|
||||
When running from source, the config options above can be configured simply as environment variables.
|
||||
### Build for other platform
|
||||
|
||||
By default, this builds targeting Ubuntu 20.04. Modify the Containerfile if you wish to target a different platform. These instructions are written using `podman`, but `docker` should work too.
|
||||
|
||||
1. Install container software: `sudo apt install podman`.
|
||||
2. Install database server: `sudo apt install mysql-server-8.0`. Create a database called `soundfx`
|
||||
3. Install SQLx CLI: `cargo install sqlx-cli`
|
||||
4. From the source code directory, execute `sqlx migrate run`
|
||||
5. Build container image: `podman build -t soundfx .`
|
||||
6. Build with podman: `podman run --rm --network=host -v "$PWD":/mnt -w /mnt -e "DATABASE_URL=mysql://user@localhost/soundfx" soundfx cargo deb`
|
||||
|
||||
Reference in New Issue
Block a user