error fixed: putting things together and cleanup
This commit is contained in:
@ -9,7 +9,6 @@ DB_ROOT_PASSWORD_VERSION=1
|
||||
|
||||
APP_ENV=production
|
||||
APP_NAME="Open Inventory"
|
||||
APP_KEY=
|
||||
APP_DEBUG=false
|
||||
|
||||
LOG_CHANNEL=stdout
|
||||
@ -47,6 +46,6 @@ COMPANY_COUNTRY=""
|
||||
COMPANY_TELEPHONE=""
|
||||
COMPANY_EMAIL=""
|
||||
|
||||
EOTL_PATH_DATA="/home/eotl/data"
|
||||
EOTL_URL_DISPATCH="http://localhost:8082"
|
||||
EOTL_URL_SEXTANT="http://localhost:8081"
|
||||
#EOTL_PATH_DATA="/home/eotl/data"
|
||||
#EOTL_URL_DISPATCH="http://localhost:8082"
|
||||
#EOTL_URL_SEXTANT="http://localhost:8081"
|
||||
|
21
abra.sh
21
abra.sh
@ -17,7 +17,11 @@ initial_setup() {
|
||||
echo "Generating APP_KEY..."
|
||||
php artisan key:generate
|
||||
|
||||
php vars.php # TODO: remove! it's a debug
|
||||
# clear config cache, where a previous invalid APP_KEY might still be present
|
||||
clear_cache
|
||||
|
||||
# after generating the APP_KEY, in order for Laravel to pick it up, it needs to be exported
|
||||
export_dot_env .env
|
||||
|
||||
echo "DB migrations status:"
|
||||
php artisan migrate:status
|
||||
@ -53,3 +57,18 @@ create_first_admin_user() {
|
||||
|
||||
php artisan user:first "${ADMIN_NAME}" "${ADMIN_EMAIL}" "${ADMIN_PASSWORD}"
|
||||
}
|
||||
|
||||
export_dot_env() {
|
||||
env_file_path=$1
|
||||
|
||||
if [ ! -f "$env_file_path" ]; then
|
||||
echo "Error: .env file not found at $env_file_path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while IFS='=' read -r env_key env_value
|
||||
do
|
||||
export "$env_key=$env_value"
|
||||
echo "Exported: $env_key"
|
||||
done < "$env_file_path"
|
||||
}
|
||||
|
@ -14,8 +14,6 @@ services:
|
||||
- source: entrypoint_conf
|
||||
target: /abra-entrypoint.sh
|
||||
mode: 0555
|
||||
environment:
|
||||
- DB_PASSWORD_FILE = /run/secrets/db_password
|
||||
secrets:
|
||||
- db_password
|
||||
# TODO: activate health check when done with debug
|
||||
@ -81,6 +79,7 @@ secrets:
|
||||
|
||||
configs:
|
||||
entrypoint_conf:
|
||||
# FIXME: use ENTRYPOINT_CONF_VERSION, instead of hardcoded 'v1', ATM, it's failing when using the var
|
||||
name: ${STACK_NAME}_entrypoint_conf_v1
|
||||
file: entrypoint.sh.tmpl
|
||||
template_driver: golang
|
||||
|
Reference in New Issue
Block a user