Update README.md: reorganize content, add warnings, and improve documentation for setup, modes, and development.
This commit is contained in:
120
README.md
120
README.md
@@ -1,36 +1,60 @@
|
|||||||
# Holesail-docker
|
# Holesail-docker
|
||||||
|
|
||||||
> ⚠️ **Warning!** Some of these features are untested.
|
================
|
||||||
|
|
||||||
Holesail-docker proxies traffic from or to other containers.
|
**Warning!** Some of these features are untested.
|
||||||
|
|
||||||
Clone this repo then from within the directory run:
|
Holesail-docker is a Docker container that proxies traffic from or to other containers.
|
||||||
```
|
|
||||||
docker compose up --build
|
|
||||||
```
|
|
||||||
|
|
||||||
The easiest way to do this is to create a network in Docker:
|
## Setup
|
||||||
```
|
|
||||||
docker network create proxy
|
|
||||||
```
|
|
||||||
## Server mode
|
|
||||||
|
|
||||||
You can then use the contaier name and port of the container you want to proxy, as exampled below.
|
|
||||||
|
|
||||||
```
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### Create a Docker Network
|
||||||
|
|
||||||
|
Create a Docker network to connect your containers:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker network create holesail
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pull the Image
|
||||||
|
|
||||||
|
Pull the latest Holesail-docker image:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d --name holesail \
|
||||||
|
-e MODE=server \
|
||||||
|
-e PORT=25565 \
|
||||||
|
-e HOST=minecraft \
|
||||||
|
-e CONNECTOR=very-super-secret \
|
||||||
|
--network holesail \
|
||||||
|
ghcr.io/anaxios/holesail-docker:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Modes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Holesail-docker can run in three modes: Server, Client, and Filemanager.
|
||||||
|
|
||||||
|
### Server Mode
|
||||||
|
|
||||||
|
In Server mode, Holesail-docker proxies traffic from one container to another. Example `docker-compose.yml` file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
services:
|
services:
|
||||||
holesail:
|
holesail:
|
||||||
container_name: holesail
|
container_name: holesail
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build: .
|
image: ghcr.io/anaxios/holesail-docker:latest
|
||||||
environment:
|
environment:
|
||||||
MODE: server # defaults to client
|
MODE: server
|
||||||
PORT: 25565
|
PORT: 25565
|
||||||
HOST: minecraft # defaults to 0.0.0.0
|
HOST: minecraft
|
||||||
CONNECTOR: very-super-secret # leave this blank to generate a random secret.
|
CONNECTOR: very-super-secret
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- holesail
|
||||||
|
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server
|
image: itzg/minecraft-server
|
||||||
@@ -47,50 +71,68 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- holesail
|
- holesail
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- holesail
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
holesail:
|
||||||
external: true
|
external: true
|
||||||
```
|
```
|
||||||
|
|
||||||
## Client Mode
|
### Client Mode
|
||||||
|
|
||||||
Client mode is untested!
|
**Note:** Client mode is untested!
|
||||||
|
|
||||||
```
|
In Client mode, Holesail-docker connects to a remote host. Example `docker-compose.yml` file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
services:
|
services:
|
||||||
holesail:
|
holesail:
|
||||||
container_name: holesail
|
container_name: holesail
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: "host" # host mode is required
|
network_mode: "host"
|
||||||
build: .
|
image: ghcr.io/anaxios/holesail-docker:latest
|
||||||
environment:
|
environment:
|
||||||
MODE: client # defaults to client
|
MODE: client
|
||||||
PORT: 8989
|
PORT: 8989
|
||||||
HOST: 0.0.0.0 # defaults to 0.0.0.0
|
HOST: 0.0.0.0
|
||||||
CONNECTOR: very-super-secret # leave this blank to generate a random secret.
|
CONNECTOR: very-super-secret
|
||||||
```
|
```
|
||||||
|
|
||||||
"host" network mode only works with linux. Windows and Mac are incompatible.
|
**Note:** Client mode only works on Linux, and is incompatible with Windows and Mac.
|
||||||
|
|
||||||
## Filemanager Mode
|
### Filemanager Mode
|
||||||
|
|
||||||
```
|
In Filemanager mode, Holesail-docker serves a file manager interface. Example `docker-compose.yml` file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
services:
|
services:
|
||||||
holesail:
|
holesail:
|
||||||
container_name: holesail
|
container_name: holesail
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build: .
|
image: ghcr.io/anaxios/holesail-docker:latest
|
||||||
environment:
|
environment:
|
||||||
MODE: filemanager # defaults to client
|
MODE: filemanager
|
||||||
PORT: 8989
|
PORT: 8989
|
||||||
HOST: 0.0.0.0 # defaults to 0.0.0.0
|
HOST: 0.0.0.0
|
||||||
PUBLIC: true # Defaults to true
|
PUBLIC: true
|
||||||
ROLE: user # admin for write priveleges.
|
ROLE: user
|
||||||
USERNAME: admin
|
USERNAME: admin
|
||||||
PASSWORD: admin
|
PASSWORD: admin
|
||||||
CONNECTOR: very-super-secret # leave this blank to generate a random secret.
|
CONNECTOR: very-super-secret
|
||||||
volumes:
|
volumes:
|
||||||
- <host dir>:/data # Change <host dir> to the directory you wish to share.
|
- <host dir>:/data
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Replace `<host dir>` with the directory you wish to share.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
To develop Holesail-docker, clone this repository and run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up --build
|
||||||
|
```
|
||||||
|
|
||||||
|
This will start the containers and rebuild the image if necessary.
|
||||||
|
Reference in New Issue
Block a user