Skip to content

Commit

Permalink
fix(docker): Fixing Dockerfile Paths. (#3)
Browse files Browse the repository at this point in the history
* fix(docker): πŸ› Link step in dockerfile.

Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>

* fix(docker): πŸš‘οΈ Adding node_env=production

Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>

* fix(docker): πŸ› aegir is a devDep

Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>

* fix(docker): 🍻 Runs

Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>

* fix(docker): πŸ”§ Fix config

Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>

* fix(docker): ✏️ Hirearchy

Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>

* Update README.md

---------

Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
  • Loading branch information
whizzzkid and SgtPooki committed Sep 29, 2023
1 parent d15fd79 commit a36c499
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 8 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM node:18

WORKDIR /app
ENV CONFIG_FLAGS=""
FROM node:18-alpine

COPY package*.json .
RUN npm ci --quiet
RUN npm run build
COPY . .
ENTRYPOINT ["node", "dist/src/index.js", "${CONFIG_FLAGS}"]
RUN npm run build
ENTRYPOINT [ "node", "dist/src/index.js" ]

35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@

- [Bootstrap details](#bootstrap-details)
- [Requirements of a bootstrap node](#requirements-of-a-bootstrap-node)
- [Install](#install)
- [Browser `<script>` tag](#browser-script-tag)
- [Start the bootstrapper](#start-the-bootstrapper)
- [Configuring bootstrapper options](#configuring-bootstrapper-options)
- [Building the Docker Image](#building-the-docker-image)
- [Running the docker image (once built):](#running-the-docker-image-once-built)
- [License](#license)
- [Contribution](#contribution)

Expand All @@ -37,6 +39,15 @@ Rust bootstrapper: https://github.com/libp2p/rust-libp2p/tree/master/misc/server
$ npx @libp2p/amino-dht-bootstrapper amino
```

```sh
Options:
--config <CONFIG> Path to IPFS config file
--metrics-path <METRICS_PATH> Metric endpoint path [default: /metrics]
--enable-kademlia Whether to run the libp2p Kademlia protocol and join the IPFS DHT
--enable-autonat Whether to run the libp2p Autonat protocol
-h, --help Print help
```

### Configuring bootstrapper options

```
Expand Down Expand Up @@ -70,6 +81,26 @@ $ npx @libp2p/amino-dht-bootstrapper amino
}
```

## Building the Docker Image

Building should be straightforward from the root of the repository:

```sh
$ docker build . --tag amino
```

### Running the docker image (once built):

```sh
$ docker run -it amino
```

To pass args:

```sh
$ docker run -it amino [-- [--enable-kademlia] [--enable-autonat]...]
```

## License

Licensed under either of
Expand Down

0 comments on commit a36c499

Please sign in to comment.