diff --git a/.env.example b/.env.example index 22fff590..bbda7da6 100644 --- a/.env.example +++ b/.env.example @@ -5,11 +5,12 @@ BUILD_THREADS=1 # Updates NET_VERSION in CMakeVariables.txt BUILD_VERSION=171022 # make sure this is a long random string +# grab a "SHA 256-bit Key" from here: https://keygen.io/ ACCOUNT_MANAGER_SECRET= # Should be the externally facing IP of your server host EXTERNAL_IP=localhost # Database values -MARIADB_USER=SECRET_VALUE_CHANGE_ME +MARIADB_USER=darkflame MARIADB_PASSWORD=SECRET_VALUE_CHANGE_ME MARIADB_ROOT_PASSWORD=SECRET_VALUE_CHANGE_ME -MARIADB_DATABASE=SECRET_VALUE_CHANGE_ME \ No newline at end of file +MARIADB_DATABASE=darkflame \ No newline at end of file diff --git a/Docker.md b/Docker.md index 0e6ae3d7..8bc12ada 100644 --- a/Docker.md +++ b/Docker.md @@ -14,8 +14,11 @@ 4. Run `docker-compose up --build setup` 5. Run `docker-compose up -d database` 6. Run `docker-compose up --build -d account-manager brickbuildfix` -7. Run `docker-compose up --build -d darkflame` -8. Now you can see the output of the server with `docker compose logs -f --tail 100` or `docker-compose logs -f --tail 100`. This can help you understand issues and there you can also see when the server finishes it's startup. +7. Run `docker-compose build darkflame` +8. Run `docker-compose exec darkflame /app/MasterServer -a` and setup your admin account +9. Run `docker-compose up -d darkflame` +10. Now you can see the output of the server with `docker compose logs -f --tail 100` or `docker-compose logs -f --tail 100`. This can help you understand issues and there you can also see when the server finishes it's startup. +11. You're ready to connect your client! ## Disable brickbuildfix diff --git a/docker-compose.yml b/docker-compose.yml index 7446748e..c49b2e7d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,10 +30,9 @@ services: - database:/var/lib/mysql networks: - darkflame - # (optional) ports only exposed so that DB management tools can connect - # Remove the # of the next two lines to expose your database + # You can expose these so that DB management tools can connect (WARNING: INSECURE) # ports: - # - 3306:3306 + # - 3306:3306 darkflame: container_name: DarkflameServer diff --git a/docker/setup.sh b/docker/setup.sh index 14d0951f..85776e6f 100755 --- a/docker/setup.sh +++ b/docker/setup.sh @@ -58,7 +58,7 @@ update_ini_values if [[ ! -d "/client" ]]; then echo "Client not found." - echo "Did you forgot to mount the client into the \"/client\" directory?" + echo "Did you forget to mount the client into the \"/client\" directory?" exit 1 fi @@ -69,8 +69,8 @@ if [[ ! -f "/client/extracted" ]]; then touch /client/extracted else - echo "Client already extracted. Skip this step" - echo "If you want to force re-extract, just delete the file called \"extracted\" in the client directory" + echo "Client already extracted. Skip this step..." + echo "If you want to force a re-extract, just delete the file called \"extracted\" in the client directory" fi if [[ ! -f "/client/migrated" ]]; then @@ -80,6 +80,6 @@ if [[ ! -f "/client/migrated" ]]; then touch /client/migrated else - echo "Client db already migrated. Skip this step" - echo "If you want to force re-migrate, just delete the file called \"migrated\" in the client directory" + echo "Client db already migrated. Skip this step..." + echo "If you want to force a re-migrate, just delete the file called \"migrated\" in the client directory" fi diff --git a/docker/start_server.sh b/docker/start_server.sh index 825d5014..cf22093c 100755 --- a/docker/start_server.sh +++ b/docker/start_server.sh @@ -37,12 +37,13 @@ else echo "Server already initialized" fi -while [ ! -f "/client/migrated" ]; do - echo "Client setup not finished. Waiting for setup container to complete" - sleep 1 +# check to make sure the setup has completed +while [ ! -f "/client/extracted" ] || [ ! -f "/client/migrated" ]; do + echo "Client setup not finished. Waiting for setup container to complete..." + sleep 5 done # start the server -echo "Start MasterServer" +echo "Starting MasterServer" ./MasterServer tail -f /dev/null \ No newline at end of file