Skip to content

Commit

Permalink
Merge pull request #28 from flikites/dev
Browse files Browse the repository at this point in the history
Update docker-entrypoint.sh - Load ENVs from file
  • Loading branch information
alihm authored Nov 22, 2024
2 parents 00d03de + cd1fae8 commit ceba9f9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/usr/bin/env bash
# Load the .env file
if [ -f "${DOTENV_PATH:-/var/www/html/.env}" ]; then
# Export environment variables from the .env file
while IFS='=' read -r key value; do
# Skip comments and empty lines
if [[ ! "$key" =~ ^# && -n "$key" ]]; then
export "$key=$value"
fi
done < "${DOTENV_PATH:-/var/www/html/.env}"
else
echo ".env file not found"
fi

set -Eeuo pipefail

sourceTarArgs=(
Expand Down Expand Up @@ -103,4 +116,4 @@ fi
exec "$@"

## echo "127.0.0.1 $(hostname) localhost localhost.localdomain" >> /etc/hosts;
## service sendmail restart
## service sendmail restart

0 comments on commit ceba9f9

Please sign in to comment.