From 18d797150ea1390c31b8401e2e0d45fee8fb6571 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Thu, 9 Dec 2021 00:10:29 -0700 Subject: [PATCH 1/4] PR comments --- .env.example | 4 ++-- docker-compose.yml | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 22fff590..fdfe1c9b 100644 --- a/.env.example +++ b/.env.example @@ -9,7 +9,7 @@ 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-compose.yml b/docker-compose.yml index 519fcce3..c71c8c8f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,8 +29,9 @@ services: - ./migrations/dlu:/docker-entrypoint-initdb.d networks: - darkflame - ports: - - 3306:3306 # (optional) ports only exposed so that DB management tools can connect + # You can expose these so that DB management tools can connect (WARNING: INSECURE) + # ports: + # - 3306:3306 darkflame: container_name: DarkflameServer From ecd717702d3cbd4fcae3963e84cbb9c990b2c454 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Thu, 9 Dec 2021 00:20:10 -0700 Subject: [PATCH 2/4] Added client setup check to start_server.sh --- docker/setup.sh | 10 +++++----- docker/start_server.sh | 8 +++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docker/setup.sh b/docker/setup.sh index 98a92515..7bff747d 100755 --- a/docker/setup.sh +++ b/docker/setup.sh @@ -55,7 +55,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 @@ -66,8 +66,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 @@ -77,6 +77,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 9a2345c6..6dccad7e 100755 --- a/docker/start_server.sh +++ b/docker/start_server.sh @@ -37,7 +37,13 @@ else echo "Server already initialized" fi +# 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 From 3b90669d0323fe7d147b50018e23cda7ba396f22 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Thu, 9 Dec 2021 00:34:14 -0700 Subject: [PATCH 3/4] Added a link to keygen for flask secret --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index fdfe1c9b..bbda7da6 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ 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 From 56f860676d78051ac35f3884454a1c8c829f1d07 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Thu, 9 Dec 2021 00:37:14 -0700 Subject: [PATCH 4/4] Added admin setup command to docs --- Docker.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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