Minor Labrinth documentation and missing Sendy configuration handling tweaks (#3667)
* docs(contributing/labrinth): mention SMTP vars, add helpful Redis note * chore(labrinth): short-circuit Sendy usage successfully when not setup * chore: get rid of deprecated `docker-compose` version parameter
This commit is contained in:
parent
e4f0dddf82
commit
ea9a3539eb
@ -53,8 +53,12 @@ If you would like 'placeholder_category' to be marked as supporting modpacks too
|
|||||||
INSERT INTO categories VALUES (0, 'placeholder_category', 2); -- modloader id, supported type id
|
INSERT INTO categories VALUES (0, 'placeholder_category', 2); -- modloader id, supported type id
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can find more example SQL statements for seeding the database in the `apps/labrinth/tests/files/dummy_data.sql` file.
|
||||||
|
|
||||||
The majority of configuration is done at runtime using [dotenvy](https://crates.io/crates/dotenvy) and the `.env` file. Each of the variables and what they do can be found in the dropdown below. Additionally, there are three command line options that can be used to specify to MeiliSearch what you want to do.
|
The majority of configuration is done at runtime using [dotenvy](https://crates.io/crates/dotenvy) and the `.env` file. Each of the variables and what they do can be found in the dropdown below. Additionally, there are three command line options that can be used to specify to MeiliSearch what you want to do.
|
||||||
|
|
||||||
|
During development, you might notice that changes made directly to entities in the PostgreSQL database do not seem to take effect. This is often because the Redis cache still holds outdated data. To ensure your updates are reflected, clear the cache by e.g. running `redis-cli FLUSHALL`, which will force Labrinth to fetch the latest data from the database the next time it is needed.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>.env variables & command line options</summary>
|
<summary>.env variables & command line options</summary>
|
||||||
|
|
||||||
@ -73,6 +77,11 @@ The majority of configuration is done at runtime using [dotenvy](https://crates.
|
|||||||
`MEILISEARCH_KEY`: The name that MeiliSearch is given
|
`MEILISEARCH_KEY`: The name that MeiliSearch is given
|
||||||
`BIND_ADDR`: The bind address for the server. Supports both IPv4 and IPv6
|
`BIND_ADDR`: The bind address for the server. Supports both IPv4 and IPv6
|
||||||
`MOCK_FILE_PATH`: The path used to store uploaded files; this has no default value and will panic if unspecified
|
`MOCK_FILE_PATH`: The path used to store uploaded files; this has no default value and will panic if unspecified
|
||||||
|
`SMTP_USERNAME`: The username used to authenticate with the SMTP server
|
||||||
|
`SMTP_PASSWORD`: The password associated with the `SMTP_USERNAME` for SMTP authentication
|
||||||
|
`SMTP_HOST`: The hostname or IP address of the SMTP server
|
||||||
|
`SMTP_PORT`: The port number on which the SMTP server is listening (commonly 25, 465, or 587)
|
||||||
|
`SMTP_TLS`: The TLS mode to use for the SMTP connection, which can be one of the following: `none`, `opportunistic_start_tls`, `requires_start_tls`, `tls`
|
||||||
|
|
||||||
#### CDN options
|
#### CDN options
|
||||||
|
|
||||||
|
@ -1296,6 +1296,11 @@ pub async fn sign_up_sendy(email: &str) -> Result<(), AuthenticationError> {
|
|||||||
let api_key = dotenvy::var("SENDY_API_KEY")?;
|
let api_key = dotenvy::var("SENDY_API_KEY")?;
|
||||||
let site_url = dotenvy::var("SITE_URL")?;
|
let site_url = dotenvy::var("SITE_URL")?;
|
||||||
|
|
||||||
|
if url.is_empty() || url == "none" {
|
||||||
|
tracing::info!("Sendy URL not set, skipping signup");
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let mut form = HashMap::new();
|
let mut form = HashMap::new();
|
||||||
|
|
||||||
form.insert("api_key", &*api_key);
|
form.insert("api_key", &*api_key);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
version: '3'
|
|
||||||
services:
|
services:
|
||||||
postgres_db:
|
postgres_db:
|
||||||
image: postgres:alpine
|
image: postgres:alpine
|
||||||
|
Loading…
x
Reference in New Issue
Block a user