Skip to content

Commit a5f0da1

Browse files
safegaurd againts empty envs
1 parent 53b4947 commit a5f0da1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docker-compose.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
pull_policy: always
66
env_file:
77
- path: ./ssv.env
8-
required: false
8+
required: true
99
environment:
1010
- CONFIG_PATH=./config/config.example.yaml
1111
- CONSENSUS_TYPE=validation
@@ -29,9 +29,13 @@ services:
2929
image: docker.io/ssvlabs/ssv-node:latest
3030
env_file:
3131
- path: ./ssv.env
32-
required: false
32+
required: true
3333
command: /bin/bash -c '
3434
set -e;
35+
if [ -z "$${PRIVATE_KEY_FILE}" ] || [ -z "$${PASSWORD_FILE}" ]; then
36+
echo ERROR - PRIVATE_KEY_FILE or PASSWORD_FILE is not set;
37+
exit 1;
38+
fi;
3539
echo $${PRIVATE_KEY_FILE};
3640
if [ -s $${PRIVATE_KEY_FILE} ]; then
3741
echo "private key already exists, skipping generation.";

0 commit comments

Comments
 (0)