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