From f932ce770618c03d99bd885cc6a56ce5c5d8f1f7 Mon Sep 17 00:00:00 2001 From: Erb3 <49862976+Erb3@users.noreply.github.com> Date: Fri, 2 May 2025 16:20:40 +0200 Subject: [PATCH] chore: move to .env.example (#3592) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: move to .env.example * docs: meniton copying .env.example * chore: app-lib env example Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com> Signed-off-by: Erb3 <49862976+Erb3@users.noreply.github.com> --------- Signed-off-by: Erb3 <49862976+Erb3@users.noreply.github.com> --- apps/daedalus_client/{.env => .env.example} | 0 apps/docs/src/content/docs/contributing/labrinth.md | 2 +- apps/labrinth/{.env => .env.example} | 0 packages/app-lib/.env.example | 2 ++ 4 files changed, 3 insertions(+), 1 deletion(-) rename apps/daedalus_client/{.env => .env.example} (100%) rename apps/labrinth/{.env => .env.example} (100%) create mode 100644 packages/app-lib/.env.example diff --git a/apps/daedalus_client/.env b/apps/daedalus_client/.env.example similarity index 100% rename from apps/daedalus_client/.env rename to apps/daedalus_client/.env.example diff --git a/apps/docs/src/content/docs/contributing/labrinth.md b/apps/docs/src/content/docs/contributing/labrinth.md index 309e5d1a4..16a2e77b0 100644 --- a/apps/docs/src/content/docs/contributing/labrinth.md +++ b/apps/docs/src/content/docs/contributing/labrinth.md @@ -7,7 +7,7 @@ This project is part of our [monorepo](https://github.com/modrinth/code). You ca [labrinth] is the Rust-based backend serving Modrinth's API with the help of the [Actix](https://actix.rs) framework. To get started with a labrinth instance, install docker, docker-compose (which comes with Docker), and [Rust]. The initial startup can be done simply with the command `docker-compose up`, or with `docker compose up` (Compose V2 and later). That will deploy a PostgreSQL database on port 5432 and a MeiliSearch instance on port 7700. To run the API itself, you'll need to use the `cargo run` command, this will deploy the API on port 8000. -Now, you'll have to install the sqlx CLI, which can be done with cargo: +To get a basic configuration, copy the `.env.example` file to `.env`. Now, you'll have to install the sqlx CLI, which can be done with cargo: ```bash cargo install --git https://github.com/launchbadge/sqlx sqlx-cli --no-default-features --features postgres,rustls diff --git a/apps/labrinth/.env b/apps/labrinth/.env.example similarity index 100% rename from apps/labrinth/.env rename to apps/labrinth/.env.example diff --git a/packages/app-lib/.env.example b/packages/app-lib/.env.example new file mode 100644 index 000000000..e648f5b56 --- /dev/null +++ b/packages/app-lib/.env.example @@ -0,0 +1,2 @@ +# SQLite database file location +DATABASE_URL=sqlite:///tmp/Modrinth/code/packages/app-lib/.sqlx/generated/state.db