Update GHCR docker docs

This commit is contained in:
schlagmichdoch 2023-02-25 17:32:19 +01:00
parent e77f856515
commit 765b4e65b1

View file

@ -2,21 +2,16 @@
The easiest way to get PairDrop up and running is by using Docker. The easiest way to get PairDrop up and running is by using Docker.
## Deployment with 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 ```bash
docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 lscr.io/linuxserver/pairdrop docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 lscr.io/linuxserver/pairdrop
``` ```
### Image from GHCR > 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)).
>
```bash > To prevent bypassing the proxy by reaching the docker container directly, `127.0.0.1` is specified in the run command.
docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 ghcr.io/schlagmichdoch/pairdrop
```
### Options / Flags ### Options / Flags
Set options by using the following flags in the `docker run` command: 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:
<br> <br>
## Deployment with Docker with self-built image ### Docker Image from GHCR
### Build the image ```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 ```bash
docker build --pull . -f Dockerfile -t pairdrop 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. > `--pull` ensures always the latest node image is used.
### Run the image #### Run the image
```bash ```bash
docker run -d --restart=unless-stopped --name=pairdrop -p 127.0.0.1:3000:3000 -it pairdrop npm run start:prod 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)). > 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 ## 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)). > 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 #### Automatic restart on error
```bash ```bash