Skip to content

Commit

Permalink
chore: default to port 5050 to avoid conflicts on OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
djwhitt committed Jun 11, 2024
1 parent 7de8926 commit 4a6c910
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ COPY --from=builder /app/dist ./dist/
COPY ./healthcheck.sh /app/healthcheck.sh

# Expose port and add healthcheck
EXPOSE 5000
EXPOSE 5050
HEALTHCHECK CMD /bin/sh healthcheck.sh

# Add labels
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Starting the service:
You can check the service is running by running the command:

```shell
curl localhost:5000/ar-io/observer/healthcheck
curl localhost:5050/ar-io/observer/healthcheck
{"uptime":2.555423702,"date":"2023-09-14T21:24:27.677Z","message":"Welcome to the Permaweb."}
```

Expand All @@ -42,5 +42,5 @@ Build and run the container:

```shell
docker build --build-arg NODE_VERSION=$(cat .nvmrc |cut -c2-8) --build-arg NODE_VERSION_SHORT=$(cat .nvmrc |cut -c2-3) . -t ar-io-observer
docker run -p 5000:5000 ar-io-observer
docker run -p 5050:5050 ar-io-observer
```
2 changes: 1 addition & 1 deletion healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env sh

exec /nodejs/bin/node -e 'require("http").get("http://localhost:5000/ar-io/observer/healthcheck", (res) => { if(res.statusCode !== 200) process.exit(1); }).on("error", (err) => { process.exit(1); })'
exec /nodejs/bin/node -e 'require("http").get("http://localhost:5050/ar-io/observer/healthcheck", (res) => { if(res.statusCode !== 200) process.exit(1); }).on("error", (err) => { process.exit(1); })'
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const NUM_ARNS_NAMES_TO_OBSERVE_PER_GROUP = +env.varOrDefault(
'1',
);

export const PORT = +env.varOrDefault('PORT', '5000');
export const PORT = +env.varOrDefault('PORT', '5050');

export const GATEWAY_ASSESSMENT_CONCURRENCY = +env.varOrDefault(
'GATEWAY_ASSESSMENT_CONCURRENCY',
Expand Down

0 comments on commit 4a6c910

Please sign in to comment.