Skip to content

Commit

Permalink
Merge pull request #27 from xmtp/fix-node-up
Browse files Browse the repository at this point in the history
Fix node startup args
  • Loading branch information
snormore authored Nov 15, 2023
2 parents 08c0d72 + 6c41b84 commit e28b980
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 18 deletions.
4 changes: 0 additions & 4 deletions .env

This file was deleted.

4 changes: 4 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DB_CONNECTION_STRING="postgres://postgres:xmtp@localhost:25432/postgres?sslmode=disable"
XMTP_GRPC_ADDRESS="localhost:5556"
LOG_ENCODING=console
API_PORT="8080"
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ The server can be run using the `./dev/run` script. Both the `worker` (which lis
```sh
## Only has to be run once
./dev/up
source .env
./dev/run --xmtp-listener --api
./dev/start
```

### Command line options
Expand Down
3 changes: 2 additions & 1 deletion dev/build
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/bin/bash
set -eou pipefail

GIT_COMMIT="$(git rev-parse HEAD)"
XMTP_GO_CLIENT_VERSION="$(go list -json -m all | jq -r '. | select(.Path == "github.com/xmtp/proto") | .Version')"
Expand Down
4 changes: 4 additions & 0 deletions dev/down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -eou pipefail

docker compose down
3 changes: 2 additions & 1 deletion dev/gen-proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#!/bin/bash
set -eou pipefail

set -e

Expand Down
4 changes: 2 additions & 2 deletions dev/lint-shellcheck
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -e
#!/bin/bash
set -eou pipefail

read -ra shellcheck_paths <<< "$(grep -rIzl '^#!' dev)"
shellcheck "${shellcheck_paths[@]}"
4 changes: 2 additions & 2 deletions dev/push
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env sh
set -e
#!/bin/bash
set -eou pipefail

DOCKER_IMAGE_TAG="${DOCKER_IMAGE_TAG:-dev}"
DOCKER_IMAGE_NAME="${DOCKER_IMAGE_NAME:-xmtp/notifications-server}"
Expand Down
4 changes: 3 additions & 1 deletion dev/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env sh
#!/bin/bash
set -eou pipefail
set -a; source .env.local; set +a

go run ./cmd/server/main.go "$@"
4 changes: 4 additions & 0 deletions dev/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -eou pipefail

dev/run --xmtp-listener --api "$@"
3 changes: 2 additions & 1 deletion dev/up
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env sh
#!/bin/bash
set -eou pipefail

docker compose up -d
7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
version: '3'

services:
waku-node:
node:
image: xmtp/node-go:latest
platform: linux/amd64
command:
- --ws
- --store
- --store.enable
- --store.db-connection-string=postgres://postgres:xmtp@db:5432/postgres?sslmode=disable
- --store.reader-db-connection-string=postgres://postgres:xmtp@db:5432/postgres?sslmode=disable
- --lightpush
- --filter
- --ws-port=9001
- --wait-for-db=30s
- --api.authn.enable
Expand Down

0 comments on commit e28b980

Please sign in to comment.