add client mode example. fix expose port.

This commit is contained in:
Bob
2024-07-10 22:59:38 -07:00
parent 72541c3933
commit 324222eebf
2 changed files with 21 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
FROM node:lts-slim as base
FROM node:lts-slim AS base
RUN npm i holesail -g
@@ -6,7 +6,7 @@ ENV MODE client
ENV HOST 0.0.0.0
ENV PORT 8989
EXPOSE $PORT
EXPOSE 8989
ENTRYPOINT sh -c ' \
if [ "$MODE" = "server" ]; then \

View File

@@ -19,8 +19,6 @@ services:
container_name: holesail
restart: unless-stopped
build: .
ports:
- 25565:25565
environment:
MODE: server # defaults to client
PORT: 25565
@@ -51,3 +49,22 @@ networks:
proxy:
external: true
```
Client mode is untested!
```
services:
holesail:
container_name: holesail
restart: unless-stopped
network_mode: "host" # host mode is required
build: .
environment:
MODE: client # defaults to client
PORT: 8989
HOST: 0.0.0.0 # defaults to 0.0.0.0
CONNECTOR: very-super-secret # leave this blank to generate a random secret.
```
"host" network mode only works with linux. Windows and Mac are incompatible.