Skip to content

Commit

Permalink
Minecraft Server Using Docker Compose
Browse files Browse the repository at this point in the history
  • Loading branch information
heyvaldemar committed Sep 7, 2024
1 parent 8c32235 commit 52867ad
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/00-deployment-verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deployment Verification

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
deploy-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Create necessary Docker networks
run: |
docker network create minecraft-server-network || true
- name: Start up services using Docker Compose
run: docker compose -f minecraft-server-docker-compose.yml -p minecraft-server up -d

- name: Modify /etc/hosts for internal routing
run: |
echo "127.0.0.1 minecraft-server.heyvaldemar.net" | sudo tee -a /etc/hosts
- name: Install Python and mcstatus
run: |
sudo apt-get update
sudo apt-get install -y python3-pip
pip3 install mcstatus
- name: Check Minecraft Server status
run: |
mcstatus minecraft-server.heyvaldemar.net:25565 status
- name: Print Docker Compose services status
run: docker ps

- name: Inspect Network Configuration
run: |
docker network inspect minecraft-server-network
- name: Shutdown Docker Compose services
if: always()
run: docker compose -f minecraft-server-docker-compose.yml -p minecraft-server down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Minecraft Server Using Docker Compose

[![Deployment Verification](https://github.com/heyvaldemar/minecraft-server-docker-compose/actions/workflows/00-deployment-verification.yml/badge.svg)](https://github.com/heyvaldemar/minecraft-server-docker-compose/actions)

The badge displayed on my repository indicates the status of the deployment verification workflow as executed on the latest commit to the main branch.

**Passing**: This means the most recent commit has successfully passed all deployment checks, confirming that the Docker Compose setup functions correctly as designed.

📙 The complete installation guide is available on my [website](https://www.heyvaldemar.com/install-minecraft-server-using-docker-compose/).

💡 For details on deploying the Minecraft Proxy, check out this link: [Minecraft Server Proxy Using Docker Compose](https://github.com/heyvaldemar/minecraft-server-proxy-docker-compose/).
Expand Down

0 comments on commit 52867ad

Please sign in to comment.