Skip to content

Commit

Permalink
Rework docker entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
pouya-eghbali committed Dec 28, 2023
1 parent 43540be commit 4c957eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ services:
depends_on:
postgres:
condition: service_healthy
environment:
- UNCHAINED_NODE_TYPE=full
profiles: ["local"]
restart: always

Expand Down Expand Up @@ -50,6 +52,8 @@ services:
hostname: unchained_lite
volumes:
- ./conf.lite.yaml:/app/conf.yaml
environment:
- UNCHAINED_NODE_TYPE=lite
profiles: ["lite"]
restart: always

Expand All @@ -59,5 +63,7 @@ services:
hostname: unchained_remote
volumes:
- ./conf.remote.yaml:/app/conf.yaml
environment:
- UNCHAINED_NODE_TYPE=lite
profiles: ["remote"]
restart: always
6 changes: 5 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/sh

unchained postgres migrate conf.yaml && unchained start conf.yaml --generate
if [ "$UNCHAINED_NODE_TYPE" == "full" ]; then
unchained postgres migrate conf.yaml
fi

unchained start conf.yaml --generate

0 comments on commit 4c957eb

Please sign in to comment.