-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
# Contributing | ||
|
||
There is a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) | ||
configuration in the repository. You can use it to launch a development environment | ||
with all tools installed. | ||
- Install [Rust](https://www.rust-lang.org), [Moon](https://moonrepo.dev) and | ||
[Caddy](https://caddyserver.com/). | ||
- Make sure you have PostgreSQL installed and running. I prefer using Docker. | ||
- Run `moon r transactional:build`. This is a one-time operation. | ||
- Create the following environment file in the root of the repository: | ||
|
||
### Environment | ||
```bash title=".env" | ||
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres | ||
DEFAULT_TMDB_ACCESS_TOKEN=your-tmdb-access-token | ||
DEFAULT_MAL_CLIENT_ID=your-mal-client-id | ||
TRAKT_CLIENT_ID=your-trakt-client-id | ||
UNKEY_API_ID=dummy-api-id | ||
APP_VERSION=v5.2.1 | ||
``` | ||
|
||
Create the following environment file in the root of the repository: | ||
- Run the following commands in a separate terminals: | ||
|
||
```bash title=".env" | ||
DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres | ||
UNKEY_API_ID=api_4GvvJVbWobkNjcnnvFHmBP5pXb4K | ||
APP_VERSION=v5.2.1 | ||
DEFAULT_TMDB_ACCESS_TOKEN=your-tmdb-access-token | ||
DEFAULT_MAL_CLIENT_ID=your-mal-client-id | ||
TRAKT_CLIENT_ID=your-trakt-client-id | ||
``` | ||
```bash | ||
cargo run | ||
moon run frontend:dev | ||
caddy run --config 'ci/Caddyfile' | ||
``` | ||
|
||
- The frontend will be available at `http://localhost:8000`. | ||
|
||
In development, both servers are started independently running on `:3000` and `:5000` | ||
respectively and reverse proxied at `:8000`. To get everything started, run `mprocs` in the | ||
project root. | ||
respectively and reverse proxied at `:8000`. | ||
|
||
Your website would be available at `http://localhost:8000`. | ||
If you want to work on exporting, then you need to also have [Minio](https://min.io/) | ||
installed and running on `localhost:9000`. |