diff --git a/.env b/.env new file mode 100755 index 0000000..0fe86e3 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +RCON_HOST= +RCON_PASSWORD= +RCON_PORT=25575 diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..6e99c49 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM php:8.2-apache +ENV APACHE_DOCUMENT_ROOT=/var/www/html +COPY www/ /var/www/html/ +RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" +EXPOSE 80 \ No newline at end of file diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 1979398..d5f545f --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Inspired by [Minecraft-RCON-Console](https://github.com/ekaomk/Minecraft-RCON-Co ![Sample Mobile](samples/sample-mobile.png) -## Configuration +## Configuration (Manual installation) 1. Edit your Minecraft server `server.properties` configuration file in order to enable RCON: ``` @@ -16,13 +16,53 @@ rcon.port=25575 rcon.password=xtMJsVtmx0XypuId7jIb ``` 2. Restart your Minecraft server. -3. Download/Clone the Minecraft RCON Web Console files and edit the `config.php` file. Use the same rcon password and port than the one set in `server.properties`: +3. Download/Clone the Minecraft RCON Web Console files and edit the `config.php` file in `www` folder. Use the same rcon password and port than the one set in `server.properties`: ``` $rconHost = "localhost"; $rconPort = 25575; $rconPassword = "xtMJsVtmx0XypuId7jIb"; ``` +## Configuration (Docker) + +1. Edit your Minecraft server `server.properties` configuration file in order to enable RCON: +``` +enable-rcon=true +rcon.port=25575 +rcon.password=xtMJsVtmx0XypuId7jIb +``` +2. Restart your Minecraft server. + +3. Run the docker image and fill the correct informations either with `docker run` or `docker compose` + +### Docker run: + +``` +docker run -d \ + --restart unless-stopped \ + -e RCON_HOST="" \ + -e RCON_PASSWORD="" \ + -e RCON_PORT="25575" \ + -p :80 \ + ghcr.io/xenorki/minecraft-web-rcon:1.1 +``` + + +### Docker compose: + +``` + rcon-web: + image:ghcr.io/xenorki/minecraft-web-rcon:1.1 + restart: unless-stopped + environment: + RCON_HOST: "" + RCON_PASSWORD: "" + RCON_PORT: "25575" + ports: + - ":80" +``` + + ## Warnings * Provided as it is, **this console has no authentication check**, so anybody with access to this console can run any commands on the Minecraft server. Please check at least the documentations below, about how to setup some basic http authentification on your web server, in order to restrict the access to the console: diff --git a/config.php b/config.php deleted file mode 100644 index 1bc9e5e..0000000 --- a/config.php +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/www/config.php b/www/config.php new file mode 100755 index 0000000..857b4c3 --- /dev/null +++ b/www/config.php @@ -0,0 +1,6 @@ + diff --git a/index.php b/www/index.php old mode 100644 new mode 100755 similarity index 100% rename from index.php rename to www/index.php diff --git a/rcon/index.php b/www/rcon/index.php old mode 100644 new mode 100755 similarity index 100% rename from rcon/index.php rename to www/rcon/index.php diff --git a/rcon/rcon.php b/www/rcon/rcon.php old mode 100644 new mode 100755 similarity index 100% rename from rcon/rcon.php rename to www/rcon/rcon.php diff --git a/samples/sample-mobile.png b/www/samples/sample-mobile.png old mode 100644 new mode 100755 similarity index 100% rename from samples/sample-mobile.png rename to www/samples/sample-mobile.png diff --git a/samples/sample.png b/www/samples/sample.png old mode 100644 new mode 100755 similarity index 100% rename from samples/sample.png rename to www/samples/sample.png diff --git a/static/css/bootstrap.min.css b/www/static/css/bootstrap.min.css old mode 100644 new mode 100755 similarity index 100% rename from static/css/bootstrap.min.css rename to www/static/css/bootstrap.min.css diff --git a/static/css/style.css b/www/static/css/style.css old mode 100644 new mode 100755 similarity index 100% rename from static/css/style.css rename to www/static/css/style.css diff --git a/static/fonts/glyphicons-halflings-regular.eot b/www/static/fonts/glyphicons-halflings-regular.eot old mode 100644 new mode 100755 similarity index 100% rename from static/fonts/glyphicons-halflings-regular.eot rename to www/static/fonts/glyphicons-halflings-regular.eot diff --git a/static/fonts/glyphicons-halflings-regular.svg b/www/static/fonts/glyphicons-halflings-regular.svg old mode 100644 new mode 100755 similarity index 100% rename from static/fonts/glyphicons-halflings-regular.svg rename to www/static/fonts/glyphicons-halflings-regular.svg diff --git a/static/fonts/glyphicons-halflings-regular.ttf b/www/static/fonts/glyphicons-halflings-regular.ttf old mode 100644 new mode 100755 similarity index 100% rename from static/fonts/glyphicons-halflings-regular.ttf rename to www/static/fonts/glyphicons-halflings-regular.ttf diff --git a/static/fonts/glyphicons-halflings-regular.woff b/www/static/fonts/glyphicons-halflings-regular.woff old mode 100644 new mode 100755 similarity index 100% rename from static/fonts/glyphicons-halflings-regular.woff rename to www/static/fonts/glyphicons-halflings-regular.woff diff --git a/static/fonts/glyphicons-halflings-regular.woff2 b/www/static/fonts/glyphicons-halflings-regular.woff2 old mode 100644 new mode 100755 similarity index 100% rename from static/fonts/glyphicons-halflings-regular.woff2 rename to www/static/fonts/glyphicons-halflings-regular.woff2 diff --git a/static/js/bootstrap.min.js b/www/static/js/bootstrap.min.js old mode 100644 new mode 100755 similarity index 100% rename from static/js/bootstrap.min.js rename to www/static/js/bootstrap.min.js diff --git a/static/js/jquery-1.12.0.min.js b/www/static/js/jquery-1.12.0.min.js old mode 100644 new mode 100755 similarity index 100% rename from static/js/jquery-1.12.0.min.js rename to www/static/js/jquery-1.12.0.min.js diff --git a/static/js/jquery-migrate-1.2.1.min.js b/www/static/js/jquery-migrate-1.2.1.min.js old mode 100644 new mode 100755 similarity index 100% rename from static/js/jquery-migrate-1.2.1.min.js rename to www/static/js/jquery-migrate-1.2.1.min.js diff --git a/static/js/jquery-ui-1.12.0.min.js b/www/static/js/jquery-ui-1.12.0.min.js old mode 100644 new mode 100755 similarity index 100% rename from static/js/jquery-ui-1.12.0.min.js rename to www/static/js/jquery-ui-1.12.0.min.js diff --git a/static/js/script.js b/www/static/js/script.js old mode 100644 new mode 100755 similarity index 100% rename from static/js/script.js rename to www/static/js/script.js