https://github.com/bbckr/minecraft-server-docker
An example minecraft forge server docker image, complete with CircleCI and Terraform.
https://github.com/bbckr/minecraft-server-docker
Last synced: 5 months ago
JSON representation
An example minecraft forge server docker image, complete with CircleCI and Terraform.
- Host: GitHub
- URL: https://github.com/bbckr/minecraft-server-docker
- Owner: bbckr
- License: mit
- Created: 2018-08-25T04:05:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-18T07:24:44.000Z (over 7 years ago)
- Last Synced: 2025-02-05T09:18:46.092Z (over 1 year ago)
- Language: HCL
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# minecraft-server-docker
A base Minecraft Forge Server docker container managed in Terraform.
## Running the Container Locally
``` bash
docker-compose up -d
```
## Deploying the Infrastructure
The exported environment variables below will be configured to the terraform DigitalOcean provider when you apply. There is no need to specify it in the provider.
``` bash
# Required steps before deploying to the DigitalOcean default project
# https://www.digitalocean.com/docs/api/create-personal-access-token/
export DIGITALOCEAN_TOKEN=TOKEN
# Set docker login credentials to pull image from a private DockerHub repository
export TF_VAR_DOCKERHUB_USERNAME=USERNAME
export TF_VAR_DOCKERHUB_PASSWORD=PASSWORD
# Run in ~/.ssh
ssh-keygen -b 4096 -t rsa -f digitalocean_key
# For first time set-up
terraform init terraform/
# Apply
terraform apply --auto-approve terraform/ # optional -var="IMAGE_TAG=X.X.X" to deploy specific image tag, defaults to 'latest'
```
## Git Tags
When tag `X.Y.Z` is pushed, a CircleCi workflow will start the job that builds and pushes the image `bckr/minecraft-forge:${CIRCLE_TAG}` to the remote docker repository.
## Disclaimer
To automate the process, the [Minecraft EULA](https://account.mojang.com/documents/minecraft_eula) is set to true when the docker image is built. By running the container you automatically agree to the EULA.