mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-03-14 13:08:27 +03:00
readme and env var prefix
This commit is contained in:
parent
7f289cce03
commit
68322def60
2 changed files with 21 additions and 27 deletions
46
README.md
46
README.md
|
@ -4,18 +4,21 @@
|
|||
<strong>Back-end component of mCaptcha</strong>
|
||||
</p>
|
||||
|
||||
[](https://mcaptcha.github.io/mCaptcha/guard/index.html)
|
||||
[](https://mcaptcha.github.io/guard/guard/)
|
||||
/badge.svg>)
|
||||
[](https://deps.rs/repo/github/mCaptcha/guard)
|
||||
[](https://codecov.io/gh/mCaptcha/guard)
|
||||
<br />
|
||||
[](http://www.gnu.org/licenses/agpl-3.0)
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
**placeholder-repo** is an placeholder-repo and access management platform built for the
|
||||
[IndieWeb](indieweb.org)
|
||||
Guard is the back-end component of [mCaptcha](https://mcaptcha.org)
|
||||
system.
|
||||
|
||||
**STATUS: UNUSABLE BUT ACTIVE DEVELOPMENT**
|
||||
|
||||
### How to build
|
||||
|
||||
|
@ -39,14 +42,12 @@ $ cd guard && cargo build
|
|||
|
||||
### Configuration:
|
||||
|
||||
placeholder-repo is highly configurable.
|
||||
Guard is highly configurable.
|
||||
Configuration is applied/merged in the following order:
|
||||
|
||||
1. `config/default.toml`
|
||||
2. environment variables.
|
||||
|
||||
To make installation process seamless, placeholder-repo ships with a CLI tool to
|
||||
assist in database migrations.
|
||||
|
||||
#### Setup
|
||||
|
||||
|
@ -58,26 +59,19 @@ you will be overriding the values set in the configuration files.
|
|||
|
||||
###### Database:
|
||||
|
||||
| Name | Value |
|
||||
| ------------------------------- | -------------------------------------- |
|
||||
| `PLACEHOLDER_DATEBASE_PASSWORD` | Postgres password |
|
||||
| `PLACEHOLDER_DATEBASE_NAME` | Postgres database name |
|
||||
| `PLACEHOLDER_DATEBASE_PORT` | Postgres port |
|
||||
| `PLACEHOLDER_DATEBASE_HOSTNAME` | Postgres hostmane |
|
||||
| `PLACEHOLDER_DATEBASE_USERNAME` | Postgres username |
|
||||
| `PLACEHOLDER_DATEBASE_POOL` | Postgres database connection pool size |
|
||||
|
||||
###### Redis cache:
|
||||
|
||||
| Name | Value |
|
||||
| ---------------------------- | -------------- |
|
||||
| `PLACEHOLDER_REDIS_PORT` | Redis port |
|
||||
| `PLACEHOLDER_REDIS_HOSTNAME` | Redis hostmane |
|
||||
| Name | Value |
|
||||
| ------------------------- | -------------------------------------- |
|
||||
| `GUARD_DATEBASE_PASSWORD` | Postgres password |
|
||||
| `GUARD_DATEBASE_NAME` | Postgres database name |
|
||||
| `GUARD_DATEBASE_PORT` | Postgres port |
|
||||
| `GUARD_DATEBASE_HOSTNAME` | Postgres hostmane |
|
||||
| `GUARD_DATEBASE_USERNAME` | Postgres username |
|
||||
| `GUARD_DATEBASE_POOL` | Postgres database connection pool size |
|
||||
|
||||
###### Server:
|
||||
|
||||
| Name | Value |
|
||||
| ----------------------------------------- | --------------------------------------------------- |
|
||||
| `PLACEHOLDER_SERVER_PORT` (or) `PORT`\*\* | The port on which you want wagon to listen to |
|
||||
| `PLACEHOLDER_SERVER_IP` | The IP address on which you want wagon to listen to |
|
||||
| `PLACEHOLDER_SERVER_STATIC_FILES_DIR` | Path to directory containing static files |
|
||||
| Name | Value |
|
||||
| ----------------------------------- | --------------------------------------------------- |
|
||||
| `GUARD_SERVER_PORT` (or) `PORT`\*\* | The port on which you want wagon to listen to |
|
||||
| `GUARD_SERVER_IP` | The IP address on which you want wagon to listen to |
|
||||
| `GUARD_SERVER_STATIC_FILES_DIR` | Path to directory containing static files |
|
||||
|
|
|
@ -103,7 +103,7 @@ impl Settings {
|
|||
s.merge(File::with_name("./config/default.toml"))?;
|
||||
|
||||
// TODO change PLACEHOLDER to app name
|
||||
s.merge(Environment::with_prefix("WEBHUNT"))?;
|
||||
s.merge(Environment::with_prefix("GUARD"))?;
|
||||
|
||||
match env::var("PORT") {
|
||||
Ok(val) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue