From 4c957eb9bbac08fe0dc6212910b8f0cda2e5f48b Mon Sep 17 00:00:00 2001 From: Pouya Date: Thu, 28 Dec 2023 16:53:19 +0100 Subject: [PATCH] Rework docker entry point --- docker/compose.yaml | 6 ++++++ docker/entrypoint.sh | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docker/compose.yaml b/docker/compose.yaml index d16461ee..74b80c6a 100644 --- a/docker/compose.yaml +++ b/docker/compose.yaml @@ -10,6 +10,8 @@ services: depends_on: postgres: condition: service_healthy + environment: + - UNCHAINED_NODE_TYPE=full profiles: ["local"] restart: always @@ -50,6 +52,8 @@ services: hostname: unchained_lite volumes: - ./conf.lite.yaml:/app/conf.yaml + environment: + - UNCHAINED_NODE_TYPE=lite profiles: ["lite"] restart: always @@ -59,5 +63,7 @@ services: hostname: unchained_remote volumes: - ./conf.remote.yaml:/app/conf.yaml + environment: + - UNCHAINED_NODE_TYPE=lite profiles: ["remote"] restart: always diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index f5071625..61771610 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -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