Skip to content

Commit f533881

Browse files
committed
Adjust entrypoint script to move env file instead of removing
1 parent ab52487 commit f533881

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docker-entrypoint.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ IFS=":" read -r DB_HOST_NAME DB_PORT <<< "$DB_HOST"
1919
DB_PORT=${DB_PORT:-3306}
2020

2121
# Ensure these is no local .env file
22-
[ -f ".env" ] && rm .env
22+
if [ -f ".env" ]; then
23+
mv .env .env.bak
24+
echoerr ".env file detected - moved to .env.bak"
25+
echoerr "Please update your configuration to use environment variables in the container!"
26+
fi
2327

2428
# Check a number of essential variables are set
2529
check_vars_exist \

0 commit comments

Comments
 (0)