You've already forked AstralRinth
forked from didirus/AstralRinth
Switch to Postgres (#39)
* WIP Switch to Postgres * feat(postgres): more work on porting to postgres, now compiles * feat(docker-compose): Changed the docker-compose.yml file to use postgres. * Update docker, documentation, gh actions... * Remove bson dependency * Remove bson import * feat: move mock filehost to trait rather than cargo feature * feat(postgres): transactions for mod creation, multipart refactor * fix: Add Cargo.lock so that sqlx functions * Update sqlx offline build data * fix: Use SQLX_OFFLINE to force sqlx into offline mode for CI * Default release channels * feat(postgres): refactor database models to fit postgres models * fix: Fix sqlx prepare, fix double allocation in indexing * Add dockerfile (#40) Co-authored-by: Charalampos Fanoulis <charalampos.fanoulis@gmail.com> Co-authored-by: Aeledfyr <aeledfyr@gmail.com> Co-authored-by: redblueflame <contact@redblueflame.com> Co-authored-by: Jai A <jai.a@tuta.io> Co-authored-by: Valentin Ricard <redblueflame1@gmail.Com> Co-authored-by: Charalampos Fanoulis <charalampos.fanoulis@gmail.com>
This commit is contained in:
@@ -6,10 +6,15 @@ We reccomend using [Docker](https://www.docker.com/) for setting up your dev env
|
||||
```sh
|
||||
docker-compose up
|
||||
```
|
||||
which will deploy a Meilisearch container on port 7700, a MongoDB instance on port 27017 and a MongoDB web UI on port 8081
|
||||
which will deploy a Meilisearch container on port 7700, a PostgreSQL container on port 5432 and a pgAdmin web UI on port 8070.
|
||||
When prompted to input a server password in pgAdmin, simply enter nothing into the password field.
|
||||
|
||||
Alternatively, follow theese steps:
|
||||
1. Install and run a [MeiliSearch](https://docs.meilisearch.com/guides/introduction/quick_start_guide.html) instance
|
||||
2. Install [A local MongoDB server](https://www.mongodb.com/try/download/community)
|
||||
3. Run `mongod --dbpath path/to/db`
|
||||
4. Everything should be setup and you should be ready to contribute.
|
||||
You will have to set up the database now. To do so, install the sqlx cli:
|
||||
```sh
|
||||
cargo install --git https://github.com/launchbadge/sqlx sqlx-cli --no-default-features --features postgres
|
||||
```
|
||||
then, run the following commands to create the database and install schemas:
|
||||
```sh
|
||||
sqlx database create
|
||||
sqlx migrate run
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user