Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Latest commit

 

History

History
54 lines (34 loc) · 1.36 KB

README.md

File metadata and controls

54 lines (34 loc) · 1.36 KB

@database-playground/backend

The backend of Database Playground. Currently it acts as the resource server and the gateway of dbrunner.

You may need to bring your Logto instance for the authorization server.

Usage

You should prepare your PostgreSQL database. After that, set the POSTGRES_URI environment variable to the URI of your PostgreSQL database.

export POSTGRES_URI=postgresql://username:password@localhost:5432/database

Then, build and run the server:

cargo run --release

You can also build with Nix:

nix build .

Deployment

Deploy it directly to Zeabur with the following command:

npx zeabur deploy

You can also leverage the Nix package manager to build the Docker image for deployment:

# You should prepare a Linux remote builder.
nix build .#packages.aarch64-linux.docker  # For ARM64
nix build .#packages.x86_64-linux.docker   # For x86_64
docker load < result

Development

We use Devenv to manage the development environment, and VS Code as the IDE of Rust.

Install the recommended extensions and run direnv allow && direnv reload to set up the development environment.

Run devenv up to start the PostgreSQL service.

License

This project is licensed under the AGPL-3.0-or-later license.