-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from valentin994/add-sqlx
added migration, added database to main.rs, updated readme
- Loading branch information
Showing
9 changed files
with
1,061 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,51 @@ | ||
ForgeCMS | ||
--- | ||
A lightning fast rust based CMS. | ||
⚡A lightning fast rust based CMS. ⚡ | ||
|
||
Contributions | ||
--- | ||
## Installation | ||
The CMS is built with axum for managing the requests, and with sqlx & slqx-cli for managing the database. | ||
Out of the box there will be a review table that is initilized with the server. There is a docker compose | ||
set up to bootstrap everything, but if you already have a setup database you can run the server independently | ||
wih: | ||
|
||
```sh | ||
$ cd ./backend | ||
$ cargo run --release | ||
``` | ||
|
||
Or if you want to bootstrap from scratch use: | ||
```sh | ||
$ docker compose up | ||
``` | ||
If you want the containers to run in the background run with `-d` which is detached mode: | ||
```sc | ||
$ docker compose up -d | ||
``` | ||
|
||
To strip everything down run: | ||
```sh | ||
$ docker compose down | ||
``` | ||
|
||
If you do any changes to the code and want to apply those changes, run: | ||
```sh | ||
$ docker compose build | ||
$ docker compose up | ||
``` | ||
|
||
## Database | ||
This project uses postgres as its database of choice. | ||
When starting the application you will have these tables created: | ||
- reviews | ||
|
||
If you want to add more tables you can do that with the [sqlx-cli](https://crates.io/crates/sqlx-cli). | ||
|
||
## CICD | ||
The projects uses GitHub Actions for delivery. We are running two jobs, one is [clippy](https://doc.rust-lang.org/nightly/clippy/continuous_integration/github_actions.html) for lint and format. | ||
The other job is Integration test, in which we test every route on a dummy server. | ||
|
||
|
||
## Contributions | ||
If you want to contribute you are more than welcome. Please open a pull request and write tests for your PR. | ||
After all tests and conditions pass I'll take a look into it and merge it. | ||
|
Oops, something went wrong.