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 authored Jan 4, 2025
1 parent 2e060a3 commit 940429a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/00-deployment-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on: ubuntu-latest

env:
NETWORK_ONE: minecraft-server-network
DOCKER_COMPOSE_FILE: minecraft-server-docker-compose.yml
APP_HOSTNAME: minecraft-server.heyvaldemar.net
COMPOSE_PROJECT_NAME: minecraft-server
Expand All @@ -22,13 +23,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create necessary Docker networks
run: |
docker network create $NETWORK_ONE || true
- name: Start up services using Docker Compose
run: docker compose -f $DOCKER_COMPOSE_FILE -p $COMPOSE_PROJECT_NAME up -d

- name: Modify /etc/hosts for internal routing
run: |
echo "127.0.0.1 $APP_HOSTNAME" | sudo tee -a /etc/hosts
- name: Print Docker Compose services status
run: docker ps

- name: Install Python and mcstatus
run: |
sudo apt-get update
Expand All @@ -43,8 +51,9 @@ jobs:
sleep 10; \
done'
- name: Print Docker Compose services status
run: docker ps
- name: Inspect Network Configuration
run: |
docker network inspect $NETWORK_ONE
- name: Show container logs on failure
if: failure()
Expand Down

0 comments on commit 940429a

Please sign in to comment.