Skip to content

Commit bddbdce

Browse files
authored
Merge pull request #548 from Arisamiga/docker-modular
Update to the README for Adding new servers for Docker
2 parents 9e964e0 + f54c528 commit bddbdce

1 file changed

Lines changed: 41 additions & 17 deletions

File tree

README.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -115,27 +115,51 @@ Or click the stop button in Docker Desktop.
115115

116116
### How to add new servers using Docker?
117117
To add new servers like the Hub, Islands or Farming Island follow these steps:
118-
1. Open the `entrypoint.sh` file in the `configuration` folder.
119-
2. Add the following line to the end of the file, replacing `ServerType` with the type of server you want to add (e.g., `SKYBLOCK_HUB`, `SKYBLOCK_ISLAND`, etc.):
120-
121-
```bash
122-
screen -dmS HypixelCore_HUB java --enable-preview -jar HypixelCore.jar ServerType
118+
1. Open the `docker-compose.yml` file.
119+
2. Modify the following template and add it to the `docker-compose.yml`. (Make sure to use proper indentation):
120+
121+
```yaml
122+
<server_name>:
123+
image: game_server_prepared
124+
container_name: <server_name>
125+
restart: "unless-stopped"
126+
environment:
127+
SERVICE_CMD: java --enable-preview -jar HypixelCore.jar <ServerType>
128+
depends_on:
129+
proxy:
130+
condition: service_healthy
131+
game_server_builder:
132+
condition: service_started
133+
volumes:
134+
- ./configuration:/app/configuration_files
135+
networks:
136+
- hypixel_network
123137
```
124138
125-
3. Save the file and run `docker-compose up --build` again to apply the changes.
126-
127-
128-
If you want to run services directly in the container you can attach to the container using:
129-
130-
```bash
131-
docker-compose exec game_server /bin/bash
139+
3. Replace `<server_name>` with a unique name for your server (e.g., `hub`, `island_1`, etc.).
140+
141+
4. Replace `<ServerType>` with the appropriate server type (e.g., `SKYBLOCK_HUB`, `SKYBLOCK_ISLAND`, etc.)
142+
143+
Example:
144+
145+
```yaml
146+
hypixelcore_hub2:
147+
image: game_server_prepared
148+
container_name: hypixelcore_hub2
149+
restart: "unless-stopped"
150+
environment:
151+
SERVICE_CMD: java --enable-preview -jar HypixelCore.jar SKYBLOCK_HUB
152+
depends_on:
153+
proxy:
154+
condition: service_healthy
155+
game_server_builder:
156+
condition: service_started
157+
volumes:
158+
- ./configuration:/app/configuration_files
159+
networks:
160+
- hypixel_network
132161
```
133162

134-
or go to the `exec` tab in Docker Desktop.
135-
136-
and then run the service command inside there. It will create its own screen session for you to run the service in.
137-
138-
139163
## Common Issues
140164
1. `redis.clients.jedis.exceptions.JedisConnectionException: Failed to connect to any host resolved for DNS name.`
141165

0 commit comments

Comments
 (0)