518 setup env command (#519)
* Created command and cleaned * Simplified docker setup, created script to generate .env * add git ignore file back
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
main() {
|
||||
if [ "$1" == "bash" ]; then
|
||||
if [ "$1" = "bash" ]; then
|
||||
"$@"
|
||||
else
|
||||
wait_for_api_secret
|
||||
if [ ! -f .env ] && [ -f /secrets/client.env ]; then
|
||||
ln -sf /secrets/client.env .env
|
||||
fi
|
||||
if [ -f .env ]; then
|
||||
. .env
|
||||
else
|
||||
@@ -16,15 +12,10 @@ main() {
|
||||
run_server "$@"
|
||||
fi
|
||||
}
|
||||
wait_for_api_secret() {
|
||||
until [ -f /secrets/configured ]; do
|
||||
echo "Waiting for api secret..."
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
run_server() {
|
||||
echo "Running " node "$@"
|
||||
echo "Running node $@"
|
||||
"$@"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user