diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 9730f8d4..05f96c9a 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -21,37 +21,44 @@ you will be overriding the values set in the configuration files. | Name | Value | | ------------------------------------ | ------------------------------------------------------------- | -| `MCAPTCHA_DATEBASE_PASSWORD` | Postgres password | -| `MCAPTCHA_DATEBASE_NAME` | Postgres database name | -| `MCAPTCHA_DATEBASE_PORT` | Postgres port | -| `MCAPTCHA_DATEBASE_HOSTNAME` | Postgres hostmane | -| `MCAPTCHA_DATEBASE_USERNAME` | Postgres username | -| `MCAPTCHA_DATEBASE_POOL` | Postgres database connection pool size | +| `MCAPTCHA_DATEBASE_PASSWORD` | Postgres password | +| `MCAPTCHA_DATEBASE_NAME` | Postgres database name | +| `MCAPTCHA_DATEBASE_PORT` | Postgres port | +| `MCAPTCHA_DATEBASE_HOSTNAME` | Postgres hostmane | +| `MCAPTCHA_DATEBASE_USERNAME` | Postgres username | +| `MCAPTCHA_DATEBASE_POOL` | Postgres database connection pool size | | `DATABSE_URL` (overrides above vars) | databse URL in `postgres://user:pass@host:port/dbname` format | +#### Redis: + +| Name | Value | +| --------------------- | -------------------------- | +| `MCAPTCHA_REDIS_URL` | Redis URL | +| `MCAPTCHA_REDIS_POOL` | Redis connection pool size | + #### Server: -| Name | Value | -| ------------------------------------- | --------------------------------------------------- | +| Name | Value | +| ---------------------------------------- | ------------------------------------------------------ | | `MCAPTCHA_SERVER_PORT` | The port on which you want mcaptcha to listen to | | `PORT`(overrides `MCAPTCHA_SERVER_PORT`) | The port on which you want mcaptcha to listen to | | `MCAPTCHA_SERVER_IP` | The IP address on which you want mcaptcha to listen to | | `MCAPTCHA_SERVER_DOMAIN` | Domain under which mcaptcha will be\* | -| `MCAPTCHA_SERVER_COOKIE_SECRET` | Cookie secret, must be long and random | -| `MCAPTCHA_SERVER_ALLOW_REGISTRATION` | `bool` that controls | | registration | +| `MCAPTCHA_SERVER_COOKIE_SECRET` | Cookie secret, must be long and random | +| `MCAPTCHA_SERVER_ALLOW_REGISTRATION` | `bool` that controls | | registration | \* Authentication doesn't work without `MCAPTCHA_DOMAIN` set to the correct domain ### Configuration file location: -| Name | Value | -| -------------- | ------------------- | +| Name | Value | +| ----------------- | ------------------- | | `MCAPTCHA_CONFIG` | Path to config file | ### Proof of work: -| Name | Value | -| ---------------- | --------------------------------------------------------------------------------------- | +| Name | Value | +| ------------------- | --------------------------------------------------------------------------------------- | | `MCAPTCHA_POW_SALT` | Salt has to be long and random | | `MCAPTCHA_POW_GC` | Garbage collection duration in seconds, requires tuning but 30 is a good starting point | diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md index 992413c4..754c8154 100644 --- a/docs/DEPLOYMENT.md +++ b/docs/DEPLOYMENT.md @@ -1,6 +1,6 @@ # Deployment instructions: -See [CONFIGURATION.md](./CONFIGURATION.md) for configuration instructions +See [CONFIGURATION.md](./CONFIGURATION.md) for configuration instructions There are three ways to deploy mCaptcha: @@ -71,6 +71,11 @@ postgres=# CREATE USER mcaptcha WITH PASSWORD 'my super long password and yes y $ createdb -O mcaptcha mcaptcha # create db 'mcaptcha' with 'mcaptcha' as owner ``` +### 4. Install and load [`mCaptcha/cache`](https://github.com/mCaptcha/cache) module: + +See [`mCaptcha/cache`](https://github.com/mCaptcha/cache) for more +details. + ### 4. Build `mcaptcha`: To build `mcaptcha`, you need the following dependencies: @@ -140,8 +145,10 @@ WantedBy=multi-user.target ``` 2. Enable service: + ```bash $ sudo systemctl daemon-reload && \ sudo systemctl enable mcaptcha && \ # Auto startup during boot sudo systemctl start mcaptcha `` +``` diff --git a/src/docs.rs b/src/docs.rs index 3df5e5c9..dfce3059 100644 --- a/src/docs.rs +++ b/src/docs.rs @@ -83,7 +83,6 @@ async fn spec() -> HttpResponse { } async fn index() -> HttpResponse { - println!("getting index"); handle_embedded_file("index.html") }