Skip to content

Commit

Permalink
Fix entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarrazin committed Dec 6, 2023
1 parent 58b9921 commit 3fd71d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
if test -z "${DOTENV_LOCAL}" ; then
if ! test -f "/app/config/.env.local" ; then
echo "DOTENV_LOCAL was not found in the ENV variables and .env.local is not set using a bind volume, exiting."
exit 1
echo "DOTENV_LOCAL was not found in the ENV variables and .env.local is not set using a bind volume. We are using the default .env config."
fi;
else
echo "DOTENV_LOCAL was found in the ENV variables. Creating config/.env.local file."
Expand All @@ -11,7 +10,8 @@ fi;
if [ "$USE_LOCAL_DB" = true ] ; then
echo "USE_LOCAL_DB is set to true. Appending MONGODB_URL"

"\nMONGODB_URL=mongodb://localhost:27017" >> /app/config/.env.local
touch /app/config/.env.local
echo -e "\nMONGODB_URL=mongodb://localhost:27017" >> /app/config/.env.local

mkdir -p /data/db
mongod &
Expand Down

0 comments on commit 3fd71d4

Please sign in to comment.