feat: add docker (#6)

* misc: improve match version of types/node

* feat: improve stop with sigint signal

* feat: add docker

* feat: add docker in readme
This commit is contained in:
Jeremy Chabernaud
2023-11-15 15:33:05 -05:00
committed by GitHub
parent a1197fc77e
commit a10aa9c52f
6 changed files with 65 additions and 6 deletions
+21 -2
View File
@@ -23,8 +23,6 @@ $ npm run start:dev
$ npm run build
```
## Test
```bash
@@ -36,12 +34,33 @@ $ npm run test:cov
```
## Web interface
See [public-pool-ui](https://github.com/benjamin-wilson/public-pool-ui)
## Deployment
Install pm2 (https://pm2.keymetrics.io/)
```bash
$ pm2 start dist/main.js
```
## Docker
Build container:
```bash
$ docker build -t public-pool .
```
Run container (with default configuration):
```bash
$ docker container run --name public-pool --rm -p 3333:3333 -p 3334:3334 -p 8332:8332 public-pool
```
Run container (with custom configuration):
```bash
$ docker container run --name public-pool --rm -p 3333:3333 -p 3334:3334 -p 8332:8332 -v .env:.env public-pool
```