mirror of
https://github.com/screego/server.git
synced 2026-04-22 15:37:21 +08:00
Add docs for deploying screego in docker without network_mode: host
This commit is contained in:
+37
-13
@@ -2,7 +2,7 @@
|
||||
|
||||
Latest Version: **GITHUB_VERSION**
|
||||
|
||||
?> Before starting Screego you may read [Configuration](config.md).
|
||||
Before starting Screego you may read [Configuration](config.md).
|
||||
|
||||
!> TLS is required for Screego to work. Either enable TLS inside Screego or
|
||||
use a reverse proxy to serve Screego via TLS.
|
||||
@@ -16,26 +16,16 @@ Setting up Screego with docker is pretty easy, you basically just have to start
|
||||
docker images are multi-arch docker images.
|
||||
This means the image will work for `amd64`, `i386`, `ppc64le` (power pc), `arm64`, `armv7` (Raspberry PI) and `armv6`.
|
||||
|
||||
When using [TURN](nat-traversal.md), Screego will allocate ports for relay
|
||||
connections, this currently only works with network mode host inside docker.
|
||||
See [#56](https://github.com/screego/server/issues/56)
|
||||
|
||||
By default, Screego runs on port 5050.
|
||||
|
||||
?> Replace `EXTERNALIP` with your external IP. One way to find your external ip is with ipify.
|
||||
|
||||
```bash
|
||||
$ curl 'https://api.ipify.org'
|
||||
```
|
||||
|
||||
### Network Host
|
||||
`curl 'https://api.ipify.org'`
|
||||
|
||||
```bash
|
||||
$ docker run --net=host -e SCREEGO_EXTERNAL_IP=EXTERNALIP ghcr.io/screego/server:GITHUB_VERSION
|
||||
```
|
||||
|
||||
#### docker-compose.yml
|
||||
|
||||
**docker-compose.yml**
|
||||
```yaml
|
||||
version: "3.7"
|
||||
services:
|
||||
@@ -46,6 +36,40 @@ services:
|
||||
SCREEGO_EXTERNAL_IP: "EXTERNALIP"
|
||||
```
|
||||
|
||||
If you don't want to use the host network, then you can configure docker like this:
|
||||
|
||||
<details><summary>(Click to expand)</summary>
|
||||
<p>
|
||||
|
||||
```bash
|
||||
$ docker run -it \
|
||||
-e SCREEGO_EXTERNAL_IP=EXTERNALIP \
|
||||
-e SCREEGO_TURN_PORT_RANGE=50000:50200 \
|
||||
-p 5050:5050 \
|
||||
-p 3478:3478 \
|
||||
-p 50000-50100:50000-50200/udp \
|
||||
screego/server:GITHUB_VERSION
|
||||
```
|
||||
|
||||
#### docker-compose.yml
|
||||
|
||||
```yml
|
||||
version: "3.7"
|
||||
services:
|
||||
screego:
|
||||
image: ghcr.io/screego/server:GITHUB_VERSION
|
||||
ports:
|
||||
- 5050:5050
|
||||
- 3478:3478
|
||||
- 50000-50100:50000-50200/udp
|
||||
environment:
|
||||
SCREEGO_EXTERNAL_IP: "192.168.178.2"
|
||||
SCREEGO_TURN_PORT_RANGE: "50000:50200"
|
||||
```
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
## Binary
|
||||
|
||||
### Supported Platforms:
|
||||
|
||||
Reference in New Issue
Block a user