Skip to content

Commit

Permalink
Update NSQ configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
bconway committed Nov 15, 2023
1 parent 4d71721 commit a562fc0
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 22 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,13 @@ jobs:
credentials:
username: ownmfa
password: ${{ secrets.GHCR_PAT }}
env:
LOG_LEVEL: warn
nsqd:
image: ghcr.io/ownmfa/nsqd:v1.2.1
credentials:
username: ownmfa
password: ${{ secrets.GHCR_PAT }}
env:
LOOKUP_ADDR: nsqlookupd:4160
LOG_LEVEL: warn
redis:
image: redis:7-alpine
steps:
Expand Down
9 changes: 4 additions & 5 deletions build/deploy/hermes-deps/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: "3"
services:
postgres:
image: postgres:16-alpine
shm_size: 128mb
# command: postgres -c log_statement=all
ports:
- "127.0.0.1:5438:5432"
Expand All @@ -14,21 +15,19 @@ services:

nsqlookupd:
image: nsqio/nsq:v1.2.1
command: /nsqlookupd --log-level=warn
command: /nsqlookupd

nsqd:
image: nsqio/nsq:v1.2.1
command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 --broadcast-address=nsqd --log-level=warn
restart: on-failure
command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 --broadcast-address=nsqd
depends_on:
- nsqlookupd
volumes:
- ./volume/nsqd:/data

nsqadmin:
image: nsqio/nsq:v1.2.1
command: /nsqadmin --lookupd-http-address=nsqlookupd:4161 --log-level=warn
restart: on-failure
command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
depends_on:
- nsqlookupd
ports:
Expand Down
4 changes: 2 additions & 2 deletions build/deploy/hermes/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
hermes-api:
image: ghcr.io/ownmfa/hermes:fd458c6f
image: ghcr.io/ownmfa/hermes:4d717212
command: hermes-api
restart: on-failure
depends_on:
Expand Down Expand Up @@ -35,7 +35,7 @@ services:
- "traefik.http.services.hermes-grpc.loadbalancer.server.scheme=h2c"

hermes-notifier:
image: ghcr.io/ownmfa/hermes:fd458c6f
image: ghcr.io/ownmfa/hermes:4d717212
command: hermes-notifier
restart: on-failure
environment:
Expand Down
14 changes: 6 additions & 8 deletions build/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@ services:

nsqlookupd:
image: nsqio/nsq:v1.2.1
command: /nsqlookupd --log-level=warn
command: /nsqlookupd
ports:
- "127.0.0.1:4161:4161"

nsqd_nsqadmin:
image: nsqio/nsq:v1.2.1
# Run nsqd and nsqadmin in the same container to support a broadcast address
# outside of Docker
# Run nsqd and nsqadmin in the same container to support nsqd-nsqadmin
# connectivity and clients outside of Docker without DNS manipulation
command: >
sh -c '/nsqadmin --lookupd-http-address=nsqlookupd:4161 --log-level=warn &
/nsqd --lookupd-tcp-address=nsqlookupd:4160 --broadcast-address=127.0.0.1
--log-level=warn'
restart: on-failure
stop_grace_period: 1s
sh -c '/nsqd --lookupd-tcp-address=nsqlookupd:4160
--broadcast-address=127.0.0.1 &
/nsqadmin --lookupd-http-address=nsqlookupd:4161'
depends_on:
- nsqlookupd
ports:
Expand Down
2 changes: 1 addition & 1 deletion build/nsq/Dockerfile-nsqd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nsqio/nsq:v1.2.1

CMD /nsqd --lookupd-tcp-address=${LOOKUP_ADDR} --log-level=${LOG_LEVEL}
CMD /nsqd --lookupd-tcp-address=${LOOKUP_ADDR}
2 changes: 1 addition & 1 deletion build/nsq/Dockerfile-nsqlookupd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM nsqio/nsq:v1.2.1

CMD /nsqlookupd --log-level=${LOG_LEVEL}
CMD /nsqlookupd
4 changes: 2 additions & 2 deletions build/nsq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ docker logout ghcr.io
## Usage

```
docker run -it --env LOG_LEVEL=info ghcr.io/ownmfa/nsqlookupd:v1.2.1
docker run -it ghcr.io/ownmfa/nsqlookupd:v1.2.1
docker run -it --env LOOKUP_ADDR=nsqlookupd:4160 --env LOG_LEVEL=info ghcr.io/ownmfa/nsqd:v1.2.1
docker run -it --env LOOKUP_ADDR=nsqlookupd:4160 ghcr.io/ownmfa/nsqd:v1.2.1
```

0 comments on commit a562fc0

Please sign in to comment.