one more fixup

This commit is contained in:
blu 2024-03-18 14:23:09 +01:00
parent c18eaf48c8
commit 10391ffcd3
Signed by: blu
GPG Key ID: 9DF47BD2E647A7D6
2 changed files with 4 additions and 9 deletions

View File

@ -1,5 +1,9 @@
##### START - essential values to be configured
DOMAIN="open-inventory.example.net"
APP_URL="https://open-inventory.example.net"
### obtain an APP_KEY via `/dev/urandom | head -c 32 | base64`, it looks like something like this: "jTYFZ/0b55r7UnGy2AKN9guSdqHyUl+iomf553Mrpd8="
APP_KEY=
##### END - essential values to be configured
TYPE=open-inventory
LETS_ENCRYPT_ENV=production

View File

@ -11,18 +11,9 @@ export DB_PASSWORD=$(cat /run/secrets/db_password)
initial_setup() {
cd /app/
# init .env file, we only use it for the APP_KEY, as the other variables, are exported by Docker as env vars
echo "APP_KEY=" > .env
echo "Generating APP_KEY..."
php artisan key:generate
# 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
echo "Starting DB migrations..."