Add CHELA_LISTEN_ADDRESS
This commit is contained in:
parent
aa999294f9
commit
3c759c85a1
@ -47,7 +47,10 @@ volumes:
|
|||||||
Used to define the database connection for Chela to use.
|
Used to define the database connection for Chela to use.
|
||||||
|
|
||||||
##### `CHELA_HOST`
|
##### `CHELA_HOST`
|
||||||
The hostname that Chela should refer to itself as. Defaults to `localhost`
|
The hostname that Chela should refer to itself as. Defaults to `localhost`.
|
||||||
|
|
||||||
|
##### `CHELA_LISTEN_ADDRESS`
|
||||||
|
The address that Chela should listen on. Defaults to `0.0.0.0`.
|
||||||
|
|
||||||
### Manually
|
### Manually
|
||||||
#### Build
|
#### Build
|
||||||
@ -61,6 +64,7 @@ $ cargo build -r
|
|||||||
```bash
|
```bash
|
||||||
$ export DATABASE_URL=postgres://chela:password@dbhost/postgres?sslmode=disable
|
$ export DATABASE_URL=postgres://chela:password@dbhost/postgres?sslmode=disable
|
||||||
$ export CHELA_HOST=example.com
|
$ export CHELA_HOST=example.com
|
||||||
|
$ export CHELA_LISTEN_ADDRESS=127.0.0.1
|
||||||
$ ./target/release/chela
|
$ ./target/release/chela
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ async fn main() -> eyre::Result<()> {
|
|||||||
sqids,
|
sqids,
|
||||||
};
|
};
|
||||||
|
|
||||||
let address = "0.0.0.0";
|
let address = std::env::var("CHELA_LISTEN_ADDRESS").unwrap_or("0.0.0.0".to_string());
|
||||||
let port = 3000;
|
let port = 3000;
|
||||||
|
|
||||||
let router = init_routes(server_state);
|
let router = init_routes(server_state);
|
||||||
|
Loading…
Reference in New Issue
Block a user