Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Docker Support/Automatic World Import from Java Edition. #60

Open
2 of 3 tasks
cappuccinocosmico opened this issue Oct 8, 2024 · 4 comments
Open
2 of 3 tasks
Labels
enhancement New feature or request

Comments

@cappuccinocosmico
Copy link
Contributor

cappuccinocosmico commented Oct 8, 2024

Is your feature request related to a problem?

If someone is wanting to quickly spin up FerrumC to see the new features, or from browsing on reddit. The current process for this looks like:

  1. Git clone the project, install cargo and the rust toolchain.
  2. Compile the project and move the executable to a seperate folder.
  3. Spin up a version of regular minecraft, Install either a spigot plugin or fabric mod that could run a chunk pregenration task.
  4. Create a new world and run the chunkgen task.
  5. Wait for it to complete, then close the program, and cp the files over to the import directory.
  6. Run the executable with the --import flag, then start the server.

Describe the solution / feature you'd like.

An extremely ugly option to this would be to automate this pipeline with a docker compose, consisting of FerrumC, and a traditional minecrat docker image like https://docker-minecraft-server.readthedocs.io/en/latest/

On startup you would open the Java Edition Server, run the chunk pregen command, transfer them over to FerrumC using a docker volume and every minute or so import the region files in the docker volume into the FerrumC database.

Alternatives you've considered.

All the other options like doing direct API calls to Java Edition, will take much longer to implement, and also potentially mess up the rust code base. The main point of this would be to get you 40% of the benefits of worldgen while being hackable in 1-2 days.

Additional Context

fractalhuman on the discord

I have confimed that...

  • ... such a feature does not exist already.
  • ... I ticked all the boxes without reading them
  • ... such a feature request has not been submitted already.
@cappuccinocosmico cappuccinocosmico added the enhancement New feature or request label Oct 8, 2024
@cappuccinocosmico
Copy link
Contributor Author

Super quick mock of what the docker compose might look like:

services:
  ferrumc:
    hostname: ferrumc
    build:
      context: ./
      dockerfile: ./Dockerfile
    volumes:
      - ./volumes/import_world:/app/import
    ports:      
      - "25565:25565"
    command:
      # TODO: Way to get it to run the ./ferrumc --import every 5 minutes or so, probably just set up a cron job in opening command
      - "./ferrumc"

  java-mc:
    image: itzg/minecraft-server
    volumes:
      - ./volumes/import_world:/data/region
    run:
      # Execute commands /chunky radius 2000 and /chunky start. or equivalents
      - "idk what command this would be"```

@ReCore-sys
Copy link
Collaborator

If you wanna PR a docker file and update the readme I'll merge it but we won't spend much development time or offer much support on it since streamlining the import process is pretty low down on the list of stuff to get done

@cappuccinocosmico
Copy link
Contributor Author

Yeah that makes a lot of sense, I might just throw together something really basic, import an example world from a CDN during the build and just proceed from there.

@Eveeifyeve
Copy link

I am in process of making a docker image for this server and other servers that are rust based here but the problem is that currently ferrum doesn't support RCON currently which makes a bit harder to support, but I would have to build RCON support into ferrum before I can continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants