Merge pull request #52 from kylethedeveloper/docs
add docker-compose instructions to docs
This commit is contained in:
commit
eda60a3d78
|
@ -13,23 +13,23 @@ docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 ls
|
|||
>
|
||||
> To prevent bypassing the proxy by reaching the docker container directly, `127.0.0.1` is specified in the run command.
|
||||
|
||||
### Options / Flags
|
||||
#### Options / Flags
|
||||
Set options by using the following flags in the `docker run` command:
|
||||
|
||||
#### Port
|
||||
##### Port
|
||||
```
|
||||
-p 127.0.0.1:8080:3000
|
||||
```
|
||||
> Specify the port used by the docker image
|
||||
> - 3000 -> `-p 127.0.0.1:3000:3000`
|
||||
> - 8080 -> `-p 127.0.0.1:8080:3000`
|
||||
#### Rate limiting requests
|
||||
##### Rate limiting requests
|
||||
```
|
||||
-e RATE_LIMIT=true
|
||||
```
|
||||
> Limits clients to 100 requests per 5 min
|
||||
> Limits clients to 1000 requests per 5 min
|
||||
|
||||
#### Websocket Fallback (for VPN)
|
||||
##### Websocket Fallback (for VPN)
|
||||
```
|
||||
-e WS_FALLBACK=true
|
||||
```
|
||||
|
@ -42,8 +42,6 @@ Set options by using the following flags in the `docker run` command:
|
|||
> Beware that the traffic routed via this fallback is readable by the server. Only ever use this on instances you can trust.
|
||||
> Additionally, beware that all traffic using this fallback debits the servers data plan.
|
||||
|
||||
<br>
|
||||
|
||||
### Docker Image from GHCR
|
||||
```bash
|
||||
docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 ghcr.io/schlagmichdoch/pairdrop npm run start:prod
|
||||
|
@ -73,6 +71,36 @@ docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 -i
|
|||
>
|
||||
> To specify options replace `npm run start:prod` according to [the documentation below.](#options--flags-1)
|
||||
|
||||
<br>
|
||||
|
||||
## Deployment with Docker Compose
|
||||
Here's an example docker-compose file:
|
||||
|
||||
```yaml
|
||||
version: "2"
|
||||
services:
|
||||
pairdrop:
|
||||
image: lscr.io/linuxserver/pairdrop:latest
|
||||
container_name: pairdrop
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PUID=1000 # UID to run the application as
|
||||
- PGID=1000 # GID to run the application as
|
||||
- WS_FALLBACK=false # Set to true to enable websocket fallback if the peer to peer WebRTC connection is not available to the client.
|
||||
- RATE_LIMIT=false # Set to true to limit clients to 1000 requests per 5 min.
|
||||
- TZ=Etc/UTC # Time Zone
|
||||
ports:
|
||||
- 127.0.0.1:3000:3000 # Web UI
|
||||
```
|
||||
|
||||
Run the compose file with `docker compose up -d`.
|
||||
|
||||
> You must use a server proxy to set the X-Forwarded-For to prevent all clients from discovering each other (See [#HTTP-Server](#http-server)).
|
||||
>
|
||||
> To prevent bypassing the proxy by reaching the docker container directly, `127.0.0.1` is specified in the run command.
|
||||
|
||||
<br>
|
||||
|
||||
## Deployment with node
|
||||
|
||||
```bash
|
||||
|
@ -136,7 +164,7 @@ npm start -- --auto-restart
|
|||
```bash
|
||||
npm start -- --rate-limit
|
||||
```
|
||||
> Limits clients to 100 requests per 5 min
|
||||
> Limits clients to 1000 requests per 5 min
|
||||
|
||||
<br>
|
||||
|
||||
|
|
Loading…
Reference in New Issue