|
|
@ -92,31 +92,31 @@ cat "config" >> ".env" |
|
|
|
|
|
|
|
read -p "Should the config file 'config' be deleted after creating the container? (y/n)" DELETE_CONFIG |
|
|
|
|
|
|
|
if [ -f "config/local.yaml" ]; then |
|
|
|
if [ -f "kimai_config/local.yaml" ]; then |
|
|
|
KIMAI_CONFIG_EXISTS="true" |
|
|
|
read -p "Kimai config file 'config/local.yaml' already exists! Would you like to use this? (y/n)" USE_EXISTING_KIMAI_CONFIG |
|
|
|
read -p "Kimai config file 'kimai_config/local.yaml' already exists! Would you like to use this? (y/n)" USE_EXISTING_KIMAI_CONFIG |
|
|
|
fi |
|
|
|
|
|
|
|
if [ $KIMAI_CONFIG_EXISTS == "false" ] || [ $USE_EXISTING_KIMAI_CONFIG == "n" ]; then |
|
|
|
echo "Create blank kimai config file 'config/local.yaml'!" |
|
|
|
echo "Create blank kimai config file 'kimai_config/local.yaml'!" |
|
|
|
|
|
|
|
rm -rf touch config/local.yaml |
|
|
|
mkdir -p config |
|
|
|
touch config/local.yaml |
|
|
|
rm -rf kimai_config/local.yaml |
|
|
|
mkdir -p kimai_config |
|
|
|
touch kimai_config/local.yaml |
|
|
|
|
|
|
|
read -p "Would you like to disable user registration and password reset via mail? (y/n)" DISABLE_REGISTRATION |
|
|
|
|
|
|
|
read -p "Would you like to set the session lifetime to 24h? (y/n)" SESSION_LIFETIME_TO_24H |
|
|
|
|
|
|
|
if [ $DISABLE_REGISTRATION == "y" ]; then |
|
|
|
cat "config_examples/disable_registration_and_password_reset.yaml" >> "config/local.yaml" |
|
|
|
cat "kimai_config_examples/disable_registration_and_password_reset.yaml" >> "kimai_config/local.yaml" |
|
|
|
fi |
|
|
|
|
|
|
|
if [ $SESSION_LIFETIME_TO_24H == "y" ]; then |
|
|
|
cat "config_examples/session_lifetime_24h.yaml" >> "config/local.yaml" |
|
|
|
cat "kimai_config_examples/session_lifetime_24h.yaml" >> "kimai_config/local.yaml" |
|
|
|
fi |
|
|
|
else |
|
|
|
echo "Use existing kimai config file 'config/local.yaml'!" |
|
|
|
echo "Use existing kimai config file 'kimai_config/local.yaml'!" |
|
|
|
fi |
|
|
|
|
|
|
|
docker-compose up -d |
|
|
|