mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
make embedded pict-rs port configurable (#3201)
This commit is contained in:
parent
981c111567
commit
06a3f9c5aa
10
src/main.rs
10
src/main.rs
@ -8,9 +8,17 @@ pub async fn main() -> Result<(), LemmyError> {
|
|||||||
start_lemmy_server().await?;
|
start_lemmy_server().await?;
|
||||||
#[cfg(feature = "embed-pictrs")]
|
#[cfg(feature = "embed-pictrs")]
|
||||||
{
|
{
|
||||||
|
let pictrs_port = &SETTINGS
|
||||||
|
.pictrs_config()
|
||||||
|
.unwrap_or_default()
|
||||||
|
.url
|
||||||
|
.port()
|
||||||
|
.unwrap_or(8080);
|
||||||
|
let pictrs_address = ["127.0.0.1", &pictrs_port.to_string()].join(":");
|
||||||
|
println!("pictrs_address = {}", pictrs_address);
|
||||||
pict_rs::ConfigSource::memory(serde_json::json!({
|
pict_rs::ConfigSource::memory(serde_json::json!({
|
||||||
"server": {
|
"server": {
|
||||||
"address": "127.0.0.1:8080"
|
"address": pictrs_address
|
||||||
},
|
},
|
||||||
"old_db": {
|
"old_db": {
|
||||||
"path": "./pictrs/old"
|
"path": "./pictrs/old"
|
||||||
|
Loading…
Reference in New Issue
Block a user