Rework install script to create .env and run symfony and composer commands
This commit is contained in:
parent
2b2b3c8dc4
commit
a624faa728
16
install.sh
16
install.sh
@ -1,11 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf .env*
|
||||
|
||||
echo "APP_ENV=prod" > .env
|
||||
echo "APP_DEBUG=0" >> .env
|
||||
|
||||
LENGTH=32
|
||||
|
||||
SECRET_KEY=$(openssl rand -base64 $LENGTH | tr -d '=' | tr -d '+' | tr -d '/' | tr -d ' ')
|
||||
TRIMMED_KEY=$(cut -c1-32 <<< $SECRET_KEY)
|
||||
echo "APP_SECRET=$TRIMMED_KEY" > .env.local
|
||||
echo "APP_ENV=prod" >> .env.local
|
||||
echo "APP_DEBUG=0" >> .env.local
|
||||
echo "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"" >> .env.local
|
||||
echo "MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0" >> .env.local
|
||||
echo "APP_SECRET=$TRIMMED_KEY" >> .env
|
||||
echo "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"" >> .env
|
||||
echo "MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0" >> .env
|
||||
|
||||
symfony console doctrine:migrations:migrate --no-interaction
|
||||
COMPOSER_ALLOW_SUPERUSER=1 composer update
|
||||
|
Loading…
Reference in New Issue
Block a user