-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minecraft Server Proxy Using Docker Compose
- Loading branch information
1 parent
b418150
commit aaa1bff
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
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-lobby-network || true | ||
docker network create minecraft-server-network || true | ||
- name: Start up services using Docker Compose | ||
run: docker compose -f minecraft-server-proxy-docker-compose.yml -p minecraft-server-proxy up -d | ||
|
||
- name: Modify /etc/hosts for internal routing | ||
run: | | ||
echo "127.0.0.1 minecraft-proxy.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-proxy.heyvaldemar.net:25565 status | ||
- name: Print Docker Compose services status | ||
run: docker ps | ||
|
||
- name: Inspect Network Configuration | ||
run: | | ||
docker network inspect minecraft-server-lobby-network | ||
docker network inspect minecraft-server-network | ||
- name: Shutdown Docker Compose services | ||
if: always() | ||
run: docker compose -f minecraft-server-proxy-docker-compose.yml -p minecraft-server-proxy down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters