Skip to content

Commit

Permalink
Publish as itzg/mc-proxy and also publish to GHCR (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Jun 19, 2024
1 parent 04bec36 commit 7d5ac82
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 22 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
with:
images: |
${{ env.DOCKER_HUB_ORG }}/bungeecord
${{ env.DOCKER_HUB_ORG }}/mc-proxy
ghcr.io/${{ github.repository_owner }}/mc-proxy
tags: |
# For the "main" variant, it gets the tag as-is, without suffix
type=ref,event=tag,enable=${{ matrix.variant == env.MAIN_VARIANT }}
Expand Down Expand Up @@ -80,6 +82,14 @@ jobs:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Build and push
id: docker_build
uses: docker/[email protected]
Expand Down
47 changes: 34 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

This is a Docker image of [BungeeCord](https://www.spigotmc.org/wiki/bungeecord/)
and is intended to be used at the front-end of a cluster of
[itzg/minecraft-server](https://hub.docker.com/r/itzg/minecraft-server/) containers.
This is a Docker image that provides a choice of Minecraft proxies, such as [BungeeCord](https://www.spigotmc.org/wiki/bungeecord/) and [Velocity](https://papermc.io/software/velocity). It is intended to be used in combination with [itzg/minecraft-server](https://hub.docker.com/r/itzg/minecraft-server/) containers.

[![Build and Publish](https://github.com/itzg/docker-bungeecord/actions/workflows/build.yml/badge.svg)](https://github.com/itzg/docker-bungeecord/actions/workflows/build.yml)

Expand All @@ -14,13 +11,37 @@ you can disable online mode, which is required by bungeecord, by setting `ONLINE
docker run ... -e ONLINE_MODE=FALSE itzg/minecraft-server
```

[Here](docs/docker-compose.yml) is an example Docker Compose file.
The following is an example that can be started with `docker compose up -d`:

```yaml
services:
mc:
image: itzg/minecraft-server
environment:
EULA: "TRUE"
ONLINE_MODE: "FALSE"
volumes:
- mc-data:/data
proxy:
image: itzg/mc-proxy
environment:
BUNGEE_JAR_REVISION: "1"
CFG_MOTD: Powered by Docker
REPLACE_ENV_VARIABLES: "true"
ports:
- "25565:25577"
volumes:
- ./config.yml:/config/config.yml
- proxy-data:/server

volumes:
mc-data:
proxy-data:
```
## Healthcheck
This image contains [mc-monitor](https://github.com/itzg/mc-monitor) and uses
its `status` command to continually check on the container's. That can be observed
from the `STATUS` column of `docker ps`
This image contains [mc-monitor](https://github.com/itzg/mc-monitor) and uses its `status` command to continually check on the container's. That can be observed from the `STATUS` column of `docker ps`

```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Expand Down Expand Up @@ -241,7 +262,7 @@ _The `-i` is not needed in this case._
In order to attach and interact with the Bungeecord server, add `-it` when starting the container, such as
docker run -d -it -p 25565:25577 --name mc itzg/bungeecord
docker run -d -it -p 25565:25577 --name mc itzg/mc-proxy
With that you can attach and interact at any time using
Expand Down Expand Up @@ -312,7 +333,7 @@ version: "3.8"

services:
proxy:
image: itzg/bungeecord
image: itzg/mc-proxy
ports:
- "25577:25577"
volumes:
Expand Down Expand Up @@ -395,19 +416,19 @@ Supports the file formats:
This image may be run as a non-root user but does require an attached `/server`
volume that is writable by that uid, such as:

docker run ... -u $uid -v $(pwd)/data:/server itzg/bungeecord
docker run ... -u $uid -v $(pwd)/data:/server itzg/mc-proxy

## Java Versions

The `latest` image tag is based on Java 21, but alternate image tags are available to run with a different java version.

The image Java variant can be used as shown here:

itzg/bungeecord:{variant}
itzg/mc-proxy:{variant}

or using release version, such as `2024.5.0`

itzg/bungeecord:{release}-{variant}
itzg/mc-proxy:{release}-{variant}

| Variant | Java Version | CPU types |
|---------|--------------|-------------------|
Expand Down
13 changes: 7 additions & 6 deletions docs/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: '3.5'

services:
mc:
image: itzg/minecraft-server
environment:
EULA: "TRUE"
ONLINE_MODE: "FALSE"
bungeecord:
image: itzg/bungeecord
volumes:
- mc-data:/data
proxy:
image: itzg/mc-proxy
environment:
BUNGEE_JAR_REVISION: "1"
CFG_MOTD: Powered by Docker
Expand All @@ -16,7 +16,8 @@ services:
- "25565:25577"
volumes:
- ./config.yml:/config/config.yml
- bungeecord:/server
- proxy-data:/server

volumes:
bungeecord: {}
mc-data:
proxy-data:
2 changes: 1 addition & 1 deletion docs/multi-compose-projects/proxy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.8"

services:
proxy:
image: itzg/bungeecord
image: itzg/mc-proxy
environment:
TYPE: WATERFALL
ports:
Expand Down
2 changes: 1 addition & 1 deletion docs/velocity/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
volumes:
- ./paper-global.yml:/config/paper-global.yml
proxy:
image: itzg/bungeecord
image: itzg/mc-proxy
environment:
TYPE: VELOCITY
DEBUG: "false"
Expand Down
2 changes: 1 addition & 1 deletion docs/waterfall/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
TYPE: PAPER
ONLINE_MODE: "FALSE"
proxy:
image: itzg/bungeecord
image: itzg/mc-proxy
environment:
TYPE: WATERFALL
ENABLE_RCON: "true"
Expand Down

0 comments on commit 7d5ac82

Please sign in to comment.