edit Dockerfile to enable setting npm flags with docker run

This commit is contained in:
schlagmichdoch 2023-02-14 01:16:25 +01:00
parent c8ec8b4ede
commit bac272c0f3
2 changed files with 7 additions and 3 deletions

View file

@ -9,5 +9,3 @@ RUN npm ci
COPY . . COPY . .
EXPOSE 3000 EXPOSE 3000
CMD [ "npm", "run", "start:prod" ]

View file

@ -73,6 +73,11 @@ npm start -- --include-ws-fallback
npm run start:prod npm run start:prod
``` ```
#### Production (autostart, rate-limit and websocket fallback for VPN)
```bash
npm run start:prod -- --include-ws-fallback
```
## Deployment with Docker ## Deployment with Docker
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.
@ -88,8 +93,9 @@ docker build . -f Dockerfile -t pairdrop
### Run the image ### Run the image
```bash ```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 ## HTTP-Server
When running PairDrop, the `X-Forwarded-For` header has to be set by a proxy. Otherwise, all clients will be mutually visible. When running PairDrop, the `X-Forwarded-For` header has to be set by a proxy. Otherwise, all clients will be mutually visible.