Update package build process, add .env template, and update to Cloudron base 5.0.0
This commit is contained in:
19
start.sh
19
start.sh
@@ -1,8 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Source environment variables (if the file exists)
|
||||
[ -f /app/.env ] && source /app/.env || echo "No .env file found, using default environment variables"
|
||||
# Check and create .env file if it doesn't exist
|
||||
if [ ! -f /app/data/.env ]; then
|
||||
echo "Creating default .env file..."
|
||||
cp /app/.env.template /app/data/.env
|
||||
chown elasticsearch:elasticsearch /app/data/.env
|
||||
chmod 600 /app/data/.env
|
||||
fi
|
||||
|
||||
# Load environment variables from .env file if it exists
|
||||
if [ -f /app/data/.env ]; then
|
||||
echo "Loading environment variables from .env file..."
|
||||
set -o allexport
|
||||
source /app/data/.env
|
||||
set +o allexport
|
||||
else
|
||||
echo "No .env file found, using default environment variables"
|
||||
fi
|
||||
|
||||
# Set constants
|
||||
ES_HOME=/usr/share/elasticsearch
|
||||
|
||||
Reference in New Issue
Block a user