Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#21 - Update nginx conf, add note about chainweb version name for minimal devnet #22

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Start network:
docker compose pull
docker compose up -d
```

Stop network:

```sh
Expand Down Expand Up @@ -227,7 +226,9 @@ db/0/sqlite
- As of 2.18, this is a height of 500. It takes four hours or so to reach this from scratch.
- The rest api should be exposed on your localhost, so you can use the command below to check the height of chain 0.

`curl -s http://localhost:8080/chainweb/0.0/development/cut | jq '.hashes."'0'".height'`
`curl -s http://localhost:8080/chainweb/0.0/fast-development/cut | jq '.hashes."'0'".height`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you change the nginx port to 80 shouldn't it be 80 here as well instead of 8080?

Copy link
Author

@raduciobanu22 raduciobanu22 Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left the 8080:80 port mapping in docker-compose.yml as it was, so nginx can be reached on port 8080 from outside of the docker network.
An alternative to my change would have been to update the port mapping to 8080:8080 instead of updating the nginx config.
I created the issue and PR cause I spent a lot more time than was necessary to get the devnet up and running because of missing the fast-development chainweb version in the docs and this port misconfiguration, so hope it saves other people some time.


NOTE: Chainweb version name for minimal devnet is `fast-development`, make sure you use the correct name when querying the API.

You can also use the commands listed elsewhere in this document to query into the node container directly if you reference the right container name: devnet-bootstrap-node-1

Expand Down
2 changes: 1 addition & 1 deletion config/nginx.api.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ upstream peer-api {

server {
server_name api.devnet.chainweb.com
listen 8080;
listen 80;

location /nginx_status {
stub_status on;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx.api.minimal-l2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ upstream peer-api {

server {
server_name api.devnet.chainweb.com
listen 8080;
listen 80;

access_log /var/log/nginx/chainweb-api-access.log;
error_log /var/log/nginx/chainweb-api-error.log;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx.api.minimal.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ upstream peer-api {

server {
server_name api.devnet.chainweb.com
listen 8080;
listen 80;

access_log /var/log/nginx/chainweb-api-access.log;
error_log /var/log/nginx/chainweb-api-error.log;
Expand Down