look for OXIDE_LISTEN_ON env variable to set ip and port
This commit is contained in:
parent
01ff71b92e
commit
3912efa659
3 changed files with 6 additions and 2 deletions
|
@ -6,6 +6,8 @@ services:
|
|||
- 25565:25565
|
||||
volumes:
|
||||
- "data:/app/world"
|
||||
environment:
|
||||
OXIDE_LISTEN_ON: "0.0.0.0:25565"
|
||||
|
||||
volumes:
|
||||
data:
|
||||
|
|
|
@ -6,6 +6,7 @@ services:
|
|||
- 25565:25565
|
||||
volumes:
|
||||
- "data:/app/world"
|
||||
|
||||
environment:
|
||||
OXIDE_LISTEN_ON: "0.0.0.0:25565"
|
||||
volumes:
|
||||
data:
|
||||
|
|
|
@ -19,7 +19,8 @@ fn main() {
|
|||
}
|
||||
|
||||
fn initialize_server() {
|
||||
let listener = TcpListener::bind("0.0.0.0:25565").unwrap();
|
||||
let listener = TcpListener::bind(std::env::var("OXIDE_LISTEN_ON").unwrap_or("0.0.0.0:25565".to_string())).unwrap();
|
||||
println!("oxide listening on {}", listener.local_addr().unwrap());
|
||||
|
||||
let block_states = data::blocks::get_blocks();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue