diff --git a/.gitignore b/.gitignore index 1335bc3..f1e60cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /target /Assets-main /avatars -output.log \ No newline at end of file +output.log +docker-compose.yml +Config.toml diff --git a/Config.toml b/Config.example.toml similarity index 73% rename from Config.toml rename to Config.example.toml index 9d088d1..f452d55 100644 --- a/Config.toml +++ b/Config.example.toml @@ -1,8 +1,18 @@ -listen = "0.0.0.0:6665" +listen = "0.0.0.0:6665" # Don't touch this if you running under Docker container + +# Message of The Day +# It will be displayed to every player in the Figura menu who is connected to your server motd = """ [ { - "text": "The Sculptor\nUnofficial Backend V2 for Figura\n\n" + "text": "You are connected to " + }, + { + "color": "gold", + "text": "The Sculptor" + }, + { + "text": "\nUnofficial Backend V2 for Figura\n\n" }, { "clickEvent": { diff --git a/README.md b/README.md index 4f072a1..285d1a6 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,26 @@ Implements Ping transmission functionality via Websocket and full avatar upload And also a distinctive feature is the possibility of player identification through the third-party authorization system [Ely.By](https://ely.by/) +### Running with Docker + +You will need an already configured Docker with Traefik (you can use any reverse proxy) + +1. Create avatars folder (it will store player avatars) +2. Copy Config.example.toml and rename it to Config.toml +3. Copy docker-compose.example.yml and rename to docker-compose.yml +4. Open docker.compose.yml and uncomment the "labels" to work with Traefik and add the container to the network with Traefik. +5. `docker compose up -d` this will build and run the container with + +### Just running + +Running this way you won't need WSL when running on Windows, but.... +To do this, you will need to reverse proxy port 6665 to your domain with SSL + +1. Create avatars folder (it will store player avatars) +2. Copy Config.example.toml and rename it to Config.toml +3. Set up your reverse proxy server +4. `cargo run` + ### TODO: - [ ] Realization of storing profiles in the database - [ ] Frontend for moderation diff --git a/docker-compose.yml b/docker-compose.example.yml similarity index 100% rename from docker-compose.yml rename to docker-compose.example.yml