diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..fdaff96 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +docker-compose.yml +Dockerfile +.env +.env.example \ No newline at end of file diff --git a/.env.example b/.env.example deleted file mode 100644 index 645ebf3..0000000 --- a/.env.example +++ /dev/null @@ -1 +0,0 @@ -RCON_PASSWORD="" \ No newline at end of file diff --git a/.gitea/workflows/production.yml b/.gitea/workflows/production.yml index 00056ef..2044cf0 100644 --- a/.gitea/workflows/production.yml +++ b/.gitea/workflows/production.yml @@ -16,31 +16,31 @@ jobs: path: . - name: Transfer files - uses: burnett01/rsync-deployments@7.0.1 + uses: burnett01/rsync-deployments@8.0.4 with: switches: -azvr --delete --exclude=".gitignore" --exclude=".git" --exclude=".gitea" --exclude="data" --exclude=".env" path: . - remote_path: /home/${{ secrets.USERNAME }}/minecraft-server-example-folder + remote_path: /home/${{ secrets.USERNAME }}/minecraft-server-ironveil remote_host: ${{ secrets.HOST }} remote_user: ${{ secrets.USERNAME }} remote_key: ${{ secrets.KEY }} - name: Stop container - uses: appleboy/ssh-action@v1.2.0 + uses: appleboy/ssh-action@v1.2.5 with: host: ${{ secrets.host }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} script: | - cd minecraft-server-example-folder + cd minecraft-server-ironveil docker compose down - name: Start container - uses: appleboy/ssh-action@v1.2.0 + uses: appleboy/ssh-action@v1.2.5 with: host: ${{ secrets.host }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} script: | - cd minecraft-server-example-folder + cd minecraft-server-ironveil docker compose up -d diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..12a41d3 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Build and Publish Docker Image + +on: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+ + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ secrets.DOCKER_USERNAME }}/ironveil:${{ github.ref_name }} diff --git a/.gitea/workflows/restart.yml b/.gitea/workflows/restart.yml index a69e5af..ed0df00 100644 --- a/.gitea/workflows/restart.yml +++ b/.gitea/workflows/restart.yml @@ -9,11 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Restart container - uses: appleboy/ssh-action@v1.2.0 + uses: appleboy/ssh-action@v1.2.5 with: host: ${{ secrets.host }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} script: | - cd minecraft-server-example-folder + cd minecraft-server-ironveil docker compose restart diff --git a/.gitignore b/.gitignore index 3f8be5f..20c3fa7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -data -.env \ No newline at end of file +.env +world +modpack \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3ab24c7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# Use an official OpenJDK 17 image +FROM eclipse-temurin:17-jdk + +# Set working directory +WORKDIR /server + +# Copy server configuration files +COPY configuration/. . + +# Copy all modpack related files +COPY modpack/. . + +# Make run.sh executable +RUN chmod +x run.sh + +# Expose the default Minecraft port (25565) +EXPOSE 25565 + +# Expose the default Minecraft RCON port (25575) +EXPOSE 25575 + +# Start the server using run.sh +ENTRYPOINT ["/server/run.sh"] diff --git a/README.MD b/README.MD deleted file mode 100644 index 8669ee4..0000000 --- a/README.MD +++ /dev/null @@ -1,26 +0,0 @@ -# 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](https://docker-minecraft-server.readthedocs.io/en/latest/). - -## To run this server: -1. Use this repository as a template for a new repository. -2. Fill in the neccesary variables in the docker-compose file. -3. Copy the .env.example to a .env file and fill in the neccesary variables. -4. 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. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6aeb6a7 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Ironveil minecraft server + +To build this image you need: +- The modpack files: https://www.curseforge.com/minecraft/modpacks/over-stars/files/7566405 + +Build the image with the following command: +``` +docker build -t ironveil:{TAG} . +``` + +Replace {TAG} with the version you want to use, for example 1.0.0. + +To run the container, use the following command: +``` +docker run -d -p 25565:25565 -p 25575:25575 --name ironveil ironveil:{TAG} +``` +An example docker compose file is provided in the compose-example directory. You can use it to run the container with docker-compose. Make sure to adjust the volume paths if needed. + +Publishing is done automatically on a tag creation. \ No newline at end of file diff --git a/compose-test/docker-compose.yml b/compose-test/docker-compose.yml new file mode 100644 index 0000000..4b4da58 --- /dev/null +++ b/compose-test/docker-compose.yml @@ -0,0 +1,10 @@ +services: + ironveil: + image: ironveil:latest + container_name: ironveil + volumes: + - ./world:/server/world + ports: + - "25565:25565" + - "25575:25575" + restart: unless-stopped \ No newline at end of file diff --git a/configuration/eula.txt b/configuration/eula.txt new file mode 100644 index 0000000..02dccd9 --- /dev/null +++ b/configuration/eula.txt @@ -0,0 +1 @@ +eula=true diff --git a/configuration/server.properties b/configuration/server.properties new file mode 100644 index 0000000..c8a4dfc --- /dev/null +++ b/configuration/server.properties @@ -0,0 +1,57 @@ +#Minecraft server properties +allow-flight=false +allow-nether=true +broadcast-console-to-ops=true +broadcast-rcon-to-ops=true +difficulty=easy +enable-command-block=false +enable-jmx-monitoring=false +enable-query=false +enable-rcon=false +enable-status=true +enforce-secure-profile=true +enforce-whitelist=false +entity-broadcast-range-percentage=100 +force-gamemode=false +function-permission-level=2 +gamemode=survival +generate-structures=true +generator-settings={} +hardcore=false +hide-online-players=false +initial-disabled-packs= +initial-enabled-packs=vanilla +level-name=world +level-seed= +level-type=minecraft\:normal +max-chained-neighbor-updates=1000000 +max-players=20 +max-tick-time=60000 +max-world-size=29999984 +motd=Ironveil +network-compression-threshold=256 +online-mode=true +op-permission-level=4 +player-idle-timeout=0 +prevent-proxy-connections=false +pvp=true +query.port=25565 +rate-limit=0 +rcon.password= +rcon.port=25575 +require-resource-pack=false +resource-pack= +resource-pack-prompt= +resource-pack-sha1= +server-ip= +server-port=25565 +simulation-distance=10 +spawn-animals=true +spawn-monsters=true +spawn-npcs=true +spawn-protection=16 +sync-chunk-writes=true +text-filtering-config= +use-native-transport=true +view-distance=10 +white-list=true \ No newline at end of file diff --git a/configuration/whitelist.json b/configuration/whitelist.json new file mode 100644 index 0000000..f707add --- /dev/null +++ b/configuration/whitelist.json @@ -0,0 +1,4 @@ +[ + "player1", + "player2" +] diff --git a/data/.cache/curseforge/cache-index.json b/data/.cache/curseforge/cache-index.json new file mode 100644 index 0000000..e80b142 --- /dev/null +++ b/data/.cache/curseforge/cache-index.json @@ -0,0 +1 @@ +{"operations":{"getModFileInfo":{"1250591,7575878":{"filename":"14ef06dc-1a65-4611-87d6-c61eea6c8b00.json","expiresAt":"2026-02-12T19:47:13.246183510Z"}},"searchModWithGameIdSlugClassId":{"432,over-stars,4471":{"filename":"3fa6caf4-40e9-4b41-91b0-6d44997753b0.json","expiresAt":"2026-02-10T20:47:13.225100126Z"}}}} \ No newline at end of file diff --git a/data/.cache/curseforge/getModFileInfo/14ef06dc-1a65-4611-87d6-c61eea6c8b00.json b/data/.cache/curseforge/getModFileInfo/14ef06dc-1a65-4611-87d6-c61eea6c8b00.json new file mode 100644 index 0000000..29b205b --- /dev/null +++ b/data/.cache/curseforge/getModFileInfo/14ef06dc-1a65-4611-87d6-c61eea6c8b00.json @@ -0,0 +1 @@ +{"gameId":432,"fileName":"OS Serverpack v5.5.zip","gameVersions":["1.20.1","Forge"],"displayName":"OS Serverpack v5.5","sortableGameVersions":[{"gameVersionPadded":"0000000001.0000000020.0000000001","gameVersion":"1.20.1","gameVersionReleaseDate":"2023-06-12T14:26:38.477Z","gameVersionName":"1.20.1","gameVersionTypeId":75125},{"gameVersionPadded":"0","gameVersion":"","gameVersionReleaseDate":"2022-10-01T00:00:00Z","gameVersionName":"Forge","gameVersionTypeId":68441}],"downloadUrl":"https://edge.forgecdn.net/files/7575/878/OS%20Serverpack%20v5.5.zip","fileDate":"2026-02-04T16:40:45.800Z","exposeAsAlternative":null,"modId":1250591,"modules":[{"name":"mods","fingerprint":491038856},{"name":"scripts","fingerprint":2316932191},{"name":"run.bat","fingerprint":4191847801},{"name":"run.sh","fingerprint":3076618596},{"name":"user_jvm_args.txt","fingerprint":1298710358},{"name":"config","fingerprint":733434366},{"name":"global_packs","fingerprint":738911182},{"name":"kubejs","fingerprint":2552288896},{"name":"libraries","fingerprint":2766827340}],"dependencies":[],"fileFingerprint":2501413001,"releaseType":1,"hashes":[{"value":"718e65a9d3e5c2388ca899589f9b857537c68f3a","algo":1},{"value":"11e309d6a626309c3b5f279bc2f987f8","algo":2}],"parentProjectFileId":7566405,"alternateFileId":0,"id":7575878,"fileLength":792979618,"downloadCount":1,"serverPackFileId":null,"serverPack":false,"available":false} \ No newline at end of file diff --git a/data/.cache/curseforge/searchModWithGameIdSlugClassId/3fa6caf4-40e9-4b41-91b0-6d44997753b0.json b/data/.cache/curseforge/searchModWithGameIdSlugClassId/3fa6caf4-40e9-4b41-91b0-6d44997753b0.json new file mode 100644 index 0000000..b6c6612 --- /dev/null +++ b/data/.cache/curseforge/searchModWithGameIdSlugClassId/3fa6caf4-40e9-4b41-91b0-6d44997753b0.json @@ -0,0 +1 @@ +{"allowModDistribution":true,"screenshots":[{"description":"","id":1331753,"title":"Mossy Village Sunrise","modId":1250591,"url":"https://media.forgecdn.net/attachments/1331/753/2025-04-26_12-09-01-jpg.jpg","thumbnailUrl":"https://media.forgecdn.net/attachments/thumbnails/1331/753/310/172/2025-04-26_12-09-01-jpg.jpg"},{"description":"","id":1331744,"title":"Village","modId":1250591,"url":"https://media.forgecdn.net/attachments/1331/744/2024-09-18_21-47-01-jpg.jpg","thumbnailUrl":"https://media.forgecdn.net/attachments/thumbnails/1331/744/310/172/2024-09-18_21-47-01-jpg.jpg"},{"description":"","id":1331752,"title":"Remote Cabin Structure","modId":1250591,"url":"https://media.forgecdn.net/attachments/1331/752/2025-04-25_20-38-12-jpg.jpg","thumbnailUrl":"https://media.forgecdn.net/attachments/thumbnails/1331/752/310/172/2025-04-25_20-38-12-jpg.jpg"},{"description":"","id":1331740,"title":"Quest Book","modId":1250591,"url":"https://media.forgecdn.net/attachments/1331/740/2025-04-09_16-42-51-png.png","thumbnailUrl":"https://media.forgecdn.net/attachments/thumbnails/1331/740/310/172/2025-04-09_16-42-51-png.png"},{"description":"","id":1331750,"title":"Void Dimension","modId":1250591,"url":"https://media.forgecdn.net/attachments/1331/750/2025-04-18_18-24-59-jpg.jpg","thumbnailUrl":"https://media.forgecdn.net/attachments/thumbnails/1331/750/310/172/2025-04-18_18-24-59-jpg.jpg"},{"description":"","id":1331751,"title":"Pirate Village","modId":1250591,"url":"https://media.forgecdn.net/attachments/1331/751/2025-04-25_20-41-16-jpg.jpg","thumbnailUrl":"https://media.forgecdn.net/attachments/thumbnails/1331/751/310/172/2025-04-25_20-41-16-jpg.jpg"},{"description":"","id":1331745,"title":"Beautiful Terrain","modId":1250591,"url":"https://media.forgecdn.net/attachments/1331/745/2024-06-30_14-44-25-jpg.jpg","thumbnailUrl":"https://media.forgecdn.net/attachments/thumbnails/1331/745/310/172/2024-06-30_14-44-25-jpg.jpg"}],"classId":4471,"latestFilesIndexes":[{"filename":"Over Stars-v5.5.zip","releaseType":1,"gameVersion":"1.20.1","gameVersionTypeId":75125,"modLoader":1,"fileId":7566405}],"dateCreated":"2025-04-24T12:50:30.137Z","logo":{"description":"","id":1384614,"title":"638897969899353302.gif","modId":1250591,"url":"https://media.forgecdn.net/avatars/1384/614/638897969899353302.gif","thumbnailUrl":"https://media.forgecdn.net/avatars/thumbnails/1384/614/256/256/638897969899353302_animated.gif"},"links":{"sourceUrl":null,"issuesUrl":null,"websiteUrl":"https://www.curseforge.com/minecraft/modpacks/over-stars","wikiUrl":null},"dateReleased":"2026-02-04T16:40:45.8Z","id":1250591,"categories":[{"gameId":432,"classId":4471,"name":"Adventure and RPG","dateModified":"2015-02-16T15:58:24.98Z","parentCategoryId":4471,"id":4475,"iconUrl":"https://media.forgecdn.net/avatars/14/480/635596775049811800.png","slug":"adventure-and-rpg","url":"https://www.curseforge.com/minecraft/modpacks/adventure-and-rpg","displayIndex":0,"class":false},{"gameId":432,"classId":4471,"name":"Magic","dateModified":"2015-02-16T15:34:17.873Z","parentCategoryId":4471,"id":4473,"iconUrl":"https://media.forgecdn.net/avatars/14/474/635596760578719019.png","slug":"magic","url":"https://www.curseforge.com/minecraft/modpacks/magic","displayIndex":0,"class":false},{"gameId":432,"classId":4471,"name":"Tech","dateModified":"2015-02-16T15:35:53.467Z","parentCategoryId":4471,"id":4472,"iconUrl":"https://media.forgecdn.net/avatars/14/479/635596761534662757.png","slug":"tech","url":"https://www.curseforge.com/minecraft/modpacks/tech","displayIndex":0,"class":false},{"gameId":432,"classId":4471,"name":"Quests","dateModified":"2015-02-16T17:06:53.797Z","parentCategoryId":4471,"id":4478,"iconUrl":"https://media.forgecdn.net/avatars/14/487/635596816137981263.png","slug":"quests","url":"https://www.curseforge.com/minecraft/modpacks/quests","displayIndex":0,"class":false},{"gameId":432,"classId":4471,"name":"Combat / PvP","dateModified":"2015-02-10T21:12:37.56Z","parentCategoryId":4471,"id":4483,"iconUrl":"https://media.forgecdn.net/avatars/14/313/635591779575605594.png","slug":"combat-pvp","url":"https://www.curseforge.com/minecraft/modpacks/combat-pvp","displayIndex":0,"class":false}],"slug":"over-stars","gameId":432,"summary":"Challenging Tech-RPG Progression Pack, Unique Quests & Storyline, Tech Ages, Ferocious Bosses, Detailed Worlds, Limitless Adventures","latestFiles":[{"gameId":432,"fileName":"Over Stars-v5.5.zip","gameVersions":["1.20.1","Forge"],"displayName":"Over Stars-v5.5","sortableGameVersions":[{"gameVersionPadded":"0000000001.0000000020.0000000001","gameVersion":"1.20.1","gameVersionReleaseDate":"2023-06-12T14:26:38.477Z","gameVersionName":"1.20.1","gameVersionTypeId":75125},{"gameVersionPadded":"0","gameVersion":"","gameVersionReleaseDate":"2022-10-01T00:00:00Z","gameVersionName":"Forge","gameVersionTypeId":68441}],"downloadUrl":"https://edge.forgecdn.net/files/7566/405/Over%20Stars-v5.5.zip","fileDate":"2026-02-02T15:06:59.200Z","exposeAsAlternative":null,"modId":1250591,"modules":[{"name":"manifest.json","fingerprint":657962886},{"name":"modlist.html","fingerprint":1635060266},{"name":"overrides","fingerprint":628719641}],"dependencies":[],"fileFingerprint":1274657669,"releaseType":1,"hashes":[{"value":"35b076fa0c2fe99e1b5e83dd6239ba0f3d2ba52f","algo":1},{"value":"7a61b9a804b7514f94c13d9445b428b7","algo":2}],"parentProjectFileId":null,"alternateFileId":0,"id":7566405,"fileLength":79460179,"downloadCount":3528,"serverPackFileId":7575878,"serverPack":false,"available":false}],"dateModified":"2026-02-05T07:41:11.74Z","gamePopularityRank":6271,"thumbsUpCount":0,"name":"Over Stars","mainFileId":7566405,"primaryCategoryId":4475,"downloadCount":265023,"status":4,"authors":[{"name":"NitroRiced","id":102638458,"url":"https://www.curseforge.com/members/nitroriced"}],"featured":false,"available":false} \ No newline at end of file diff --git a/data/.rcon-cli.env b/data/.rcon-cli.env new file mode 100644 index 0000000..5238044 --- /dev/null +++ b/data/.rcon-cli.env @@ -0,0 +1 @@ +password= diff --git a/data/.rcon-cli.yaml b/data/.rcon-cli.yaml new file mode 100644 index 0000000..1986cf9 --- /dev/null +++ b/data/.rcon-cli.yaml @@ -0,0 +1 @@ +password: "" diff --git a/data/eula.txt b/data/eula.txt new file mode 100644 index 0000000..9711d34 --- /dev/null +++ b/data/eula.txt @@ -0,0 +1,4 @@ +# Generated via Docker +# Tue 10 Feb 2026 07:47:11 PM UTC +eula=true + diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 2b38d30..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,30 +0,0 @@ -services: - minecraft-server: - image: itzg/minecraft-server - stdin_open: true - tty: true - ports: - - "25565:25565" - - "25575:25575" - volumes: - - ./data:/data - - ./whitelist:/whitelist - environment: - EULA: "TRUE" - ENABLE_RCON: "TRUE" - RCON_PASSWORD: ${RCON_PASSWORD} - RCON_PORT: "25575" - MAX_PLAYERS: "69" - ICON: "https://example.com/icon.png" - TYPE: "PAPER" - VERSION: "1.21.4" - DIFFICULTY: "normal" - MEMORY: "2G" - INIT_MEMORY: "2G" - MAX_MEMORY: "4G" - SERVER_IP: "" - ENABLE_WHITELIST: "TRUE" - OVERRIDE_WHITELIST: "TRUE" - WHITELIST_FILE: /whitelist/whitelist.json - MOTD: "A Minecraft Server with docker" - restart: unless-stopped diff --git a/server-icon.png b/server-icon.png new file mode 100644 index 0000000..8b4f212 Binary files /dev/null and b/server-icon.png differ diff --git a/whitelist/whitelist.json b/whitelist/whitelist.json deleted file mode 100644 index 2af9c94..0000000 --- a/whitelist/whitelist.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "name":"zardzul", - "uuid":"9f0f315c-880d-48aa-a786-66ba83dcfb28" - } -] \ No newline at end of file