Skip to content

Commit 65bf47b

Browse files
authored
Merge pull request #16 from mriise/patch-1
Update server-setup.mdx with Docker Compose
2 parents 0285b16 + e24465f commit 65bf47b

1 file changed

Lines changed: 38 additions & 1 deletion

File tree

docs/server-setup.mdx

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,43 @@ BasisNetworkCore\BasisNetworkVersion.cs
2727
<br />
2828
<br />
2929

30+
### Run with Docker
31+
32+
Using docker-compose is the easiest and fastest way to spin up a Basis server. Docker images of the server are published to github on both `long-term-support` and `developer` branches, under `latest` and `nightly` respectively.
33+
34+
```yml
35+
services:
36+
basis-server:
37+
image: ghcr.io/basisvr/basis-server:latest # or :nightly for most recent changes
38+
container_name: basis-server
39+
restart: unless-stopped
40+
environment:
41+
SetPort: 4296 # basis port
42+
HealthCheckPort: 10666 # http healthcheck port
43+
PromethusPort: 1234 # exists but is unused
44+
Password: default_password
45+
PeerLimit: 1024 # 1024 is the maximum supported
46+
EnableStatistics: true
47+
EnableConsole: false
48+
ports:
49+
- "4296:4296/udp"
50+
- "10666:10666/tcp"
51+
- "1234:1234/tcp" # unused
52+
volumes:
53+
- ./initialresources:/app/initialresources:ro
54+
- ./config:/app/config
55+
- ./logs:/app/logs
56+
# exercise health endpoint (optional)
57+
healthcheck:
58+
# GET request, void all output.
59+
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --output-document=/dev/null http://localhost:10666/health &> /dev/null || exit 1"]
60+
interval: 30s
61+
timeout: 10s
62+
retries: 3
63+
start_period: 20s
64+
```
65+
Run once to create `config.xml` (under `./config` in the example). Settings in xml will be overridden by enviornment variables.
66+
3067
### Compile and Run on Windows
3168

3269
Assuming you have cloned the LTS branch of the repo.
@@ -188,7 +225,7 @@ the directory the server exe rests in.
188225
| `DisconnectOnUnreachable` | true | Disconnect players if unreachable. |
189226
| `AllowPeerAddressChange` | true | LNL: Allow player clients to change IP address. |
190227
| `UsingLoggingFile` | true | Enable logging to file. |
191-
| `HealthCheckHost` | localhost | Hostname used for health checks. |
228+
| `HealthCheckHost` | localhost | Hostname used for health checks. Use `*` to bind to any interface. |
192229
| `HealthCheckPort` | 10666 | Port used for health checks. |
193230
| `HealthPath` | /health | Path to health check endpoint. |
194231
| `BSRSMillisecondDefaultInterval` | 50 | |

0 commit comments

Comments
 (0)