From bac272c0f311f760f7e27be7cc581be48fa9663b Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Tue, 14 Feb 2023 01:16:25 +0100 Subject: [PATCH] edit Dockerfile to enable setting npm flags with docker run --- Dockerfile | 2 -- docs/host-your-own.md | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b5b2fe..3057f35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,3 @@ RUN npm ci COPY . . EXPOSE 3000 - -CMD [ "npm", "run", "start:prod" ] diff --git a/docs/host-your-own.md b/docs/host-your-own.md index ff32e26..f364e1b 100644 --- a/docs/host-your-own.md +++ b/docs/host-your-own.md @@ -73,6 +73,11 @@ npm start -- --include-ws-fallback npm run start:prod ``` +#### Production (autostart, rate-limit and websocket fallback for VPN) +```bash +npm run start:prod -- --include-ws-fallback +``` + ## Deployment with Docker The easiest way to get PairDrop up and running is by using Docker. @@ -88,8 +93,9 @@ docker build . -f Dockerfile -t pairdrop ### Run the image ```bash -docker run -d pairdrop +docker run -p 3000:3000 -it pairdrop npm run start:prod ``` +> To specify flags replace `npm run start:prod` according to [the documentation above.](#public-run) ## HTTP-Server When running PairDrop, the `X-Forwarded-For` header has to be set by a proxy. Otherwise, all clients will be mutually visible.