DarkflameServer/Docker.md
David Markowitz bad3845d83
Address Docker issues and remove need to extract cdclient.fdb (#895)
* Implement a server res directory

* Only convert if neither exist

* Remove unzip, Update RegEx

* readme updates

Run setup after setting working dir

Address several docker issues

Revert "Run setup after setting working dir"

This reverts commit fd2fb9228e82a350204c1ef61f7ba059479bb12f.

Fix docker

* Remove extra submodules

* Rework logic

* Switch if block

* Remove need to extract fdb from client

* Change log name

* Update FdbToSqlite.cpp
2023-01-06 23:04:20 -06:00

2.2 KiB

Run the Darkflame Server inside Docker

What you need

  • Docker (Docker Desktop or on Linux normal Docker)
  • Docker Compose (Included in Docker Desktop)
  • LEGO® Universe Client. Check the main README for details on this.

Run server inside Docker

  1. Copy .env.example and save it as .env inside the root directory of this repository
  2. Edit the .env file and add your path to the root directory of your LEGO® Universe Client after CLIENT_PATH=
  3. Update other values in the .env file as needed (be sure to update passwords!)
  4. Run docker compose up -d --build
  5. Run docker compose exec darkflame /app/MasterServer -a and setup your admin account
  6. Follow the directions here to setup regular user accounts. The server will be accessible at: http://<EXTERNAL_IP>:5000
  7. 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.
  8. You're ready to connect your client!

NOTE #1: If you're running an older version of Docker, you may need to use the command docker-compose instead of docker compose.

NOTE #2: To stop the server simply run docker compose down and to restart it just run docker compose up -d again. No need to run all the steps above every time.

NOTE #3: Docker buildkit needs to be enabled. https://docs.docker.com/develop/develop-images/build_enhancements/#to-enable-buildkit-builds

NOTE #4: Make sure to run the following in the repo root directory after cloning so submodules are also downloaded.

git submodule update --init --recursive

NOTE #5: If DarkflameSetup fails due to not having cdclient.fdb, rename CDClient.fdb (in the same folder) to cdclient.fdb

Disable brickbuildfix

If you don't need the http server running on port 80 do this:

  1. Create a file with the name docker-compose.override.yml in the root of the repository
  2. Paste this content:
services:
  brickbuildfix:
    profiles:
      - donotstart
  1. Now run docker compose up -d