1.6 KiB
Minecraft Server Template
This is the minecraft server template that you can use to create minecraft servers. It uses the itzg/minecraft-server docker image to create the server within a docker container for ease of deployment. Documentation for the itzg/minecraft-server image can be found here.
To run this server:
- Use this repository as a template for a new repository.
- Fill in the neccesary variables in the docker-compose file.
- Copy the .env.example to a .env file and fill in the neccesary variables.
- Run the server using
docker compose up -d.
Deployment:
This server can be deployed with the provided gitea pipeline. Add the following secrets to the repository under actions -> secrets:
HOST: The IP of the server.USERNAME: The username of the user.KEY: The private key to connect to the server. ( Found in 1password )
A deployment is automatically run when a tag is created. The tag must be in the format vX.X.X where X is a number.
The pipeline production.yml will deploy the server when a tag is created.
Change the directory ( minecraft-server-example-folder ) to the directory where the server will be located in the server. This directory must be defined in both the production.yml and the restart.yml.
Important Notes:
The data directory will be created and populated with the server files the first time the server is run. please do not add these files to the repository.
The current config is set to use Fabric, if you would like to use Forge or any other modloader, please refer to the documentation stated above.