The first time you deploy the app, you'll need to apply the migrations to the database. Run setup_db.sh
to deploy and initialize the database. Afterwards, run docker compose up -d
to build and deploy the app and its remaining components.
To disable the app, run docker compose down
. To redeploy again in the future, run docker compose up -d
.
To set up a local development environment in Linux, you'll need to install a few things:
Then, run the following commands:
# Install the `libpq-dev` package
apt-get update
apt-get install -y libpq-dev
# Install the trunk build tool and wasm build target
cargo install --locked trunk
rustup target add wasm32-unknown-unknown
# Initialize the database
./setup_db.sh
# Deploy auxiliary docker services
docker compose up -d db redis llm-api
# Set environment variables
export $(cat .env | xargs)
# Build the frontend
cd front
trunk build --release # i've had issues building it on debug, so for now, just build with `--release`
cd ..
# Build & run the backend
cargo run
To redeploy changes to the backend, rerun cargo run
. To redeploy changes to the frontend, cd
into front
and run trunk build
. The new frontend changes should be accessible without restarting the backend; just force refresh the page with shift+F5.
Deploying a local development environment in Windows is currently unsupported.