Skip to content

Commit

Permalink
added standalone node type
Browse files Browse the repository at this point in the history
  • Loading branch information
iDmple committed Feb 24, 2024
1 parent ee6caed commit 49fdc9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
POSTGRES_USER="<user>"
POSTGRES_PASSWORD="<pass>"
POSTGRES_DB_STANDALONE="<db>"
POSTGRES_DB="<db>"
GF_SECURITY_ADMIN_USER="<gf_user>"
GF_SECURITY_ADMIN_PASSWORD="<gf_pass>"
9 changes: 6 additions & 3 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ services:
# restart: always

unchained_standalone:
image: ghcr.io/kenshitech/unchained:latest
image: ghcr.io/kenshitech/unchained:v0.11.9-rc.5
container_name: unchained_standalone
hostname: unchained_standalone
volumes:
- ./conf.standalone.yaml:/app/conf.yaml
- ./conf:/app/conf
- ./context:/app/context
depends_on:
postgres:
condition: service_healthy
environment:
- UNCHAINED_NODE_TYPE=standalone
- UNCHAINED_CMD=worker
profiles: ["standalone"]
restart: always

Expand All @@ -40,7 +42,7 @@ services:
profiles: ["standalone"]
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB_STANDALONE"]
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -71,6 +73,7 @@ services:
- ./context:/app/context
environment:
- UNCHAINED_NODE_TYPE=worker
- UNCHAINED_CMD=worker
profiles: ["worker"]
restart: always

Expand Down
10 changes: 1 addition & 9 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,4 @@

echo "Running a $UNCHAINED_NODE_TYPE node."

#if [ $UNCHAINED_NODE_TYPE = "broker" ]; then
# unchained postgres migrate conf.yaml
# retVal=$?
# if [ $retVal -ne 0 ]; then
# exit $retVal
# fi
#fi

./unchained $UNCHAINED_NODE_TYPE -c conf/conf.$UNCHAINED_NODE_TYPE.yaml -s conf/secrets.$UNCHAINED_NODE_TYPE.yaml -x context/$UNCHAINED_NODE_TYPE
./unchained $UNCHAINED_CMD -c conf/conf.$UNCHAINED_NODE_TYPE.yaml -s conf/secrets.$UNCHAINED_NODE_TYPE.yaml -x context/$UNCHAINED_NODE_TYPE

0 comments on commit 49fdc9c

Please sign in to comment.