From 765b4e65b1bb5a3df2d1d51b4c700f30f6d5bafe Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Sat, 25 Feb 2023 17:32:19 +0100 Subject: [PATCH] Update GHCR docker docs --- docs/host-your-own.md | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/docs/host-your-own.md b/docs/host-your-own.md index aafc06e..9d10f0c 100644 --- a/docs/host-your-own.md +++ b/docs/host-your-own.md @@ -2,21 +2,16 @@ The easiest way to get PairDrop up and running is by using Docker. ## Deployment with Docker -> 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 and reach the docker container directly, `127.0.0.1` is specified in the run command. -### Image from Docker Hub +### Docker Image from Docker Hub ```bash docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 lscr.io/linuxserver/pairdrop ``` -### Image from GHCR - -```bash -docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 ghcr.io/schlagmichdoch/pairdrop -``` +> 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. ### Options / Flags Set options by using the following flags in the `docker run` command: @@ -49,8 +44,18 @@ Set options by using the following flags in the `docker run` command:
-## Deployment with Docker with self-built image -### Build the image +### 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 +``` +> 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. +> +> To specify options replace `npm run start:prod` according to [the documentation below.](#options--flags-1) + +### Docker Image self-built +#### Build the image ```bash docker build --pull . -f Dockerfile -t pairdrop ``` @@ -58,15 +63,15 @@ docker build --pull . -f Dockerfile -t pairdrop > > `--pull` ensures always the latest node image is used. -### Run the image +#### Run the image ```bash docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 -it pairdrop npm run start:prod ``` > 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 and reach the docker container directly, `127.0.0.1` is specified in the run command. +> To prevent bypassing the proxy by reaching the docker container directly, `127.0.0.1` is specified in the run command. > -> To specify options replace `npm run start:prod` according to [the documentation above.](#options--flags) +> To specify options replace `npm run start:prod` according to [the documentation below.](#options--flags-1) ## Deployment with node @@ -117,7 +122,7 @@ npm start -- --localhost-only > > 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)). > -> Use this when deploying PairDrop with node to prevent bypassing the proxy and reach the docker container directly. +> Use this when deploying PairDrop with node to prevent bypassing the proxy by reaching the docker container directly. #### Automatic restart on error ```bash