fix init script
This commit is contained in:
@@ -18,6 +18,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8080:8000"
|
- "8080:8000"
|
||||||
environment:
|
environment:
|
||||||
|
LARAVEL_DATABASE_TYPE: mariadb
|
||||||
LARAVEL_DATABASE_USER: laravel_user
|
LARAVEL_DATABASE_USER: laravel_user
|
||||||
LARAVEL_DATABASE_PASSWORD: super_strong_password
|
LARAVEL_DATABASE_PASSWORD: super_strong_password
|
||||||
LARAVEL_DATABASE_NAME: laravel_db
|
LARAVEL_DATABASE_NAME: laravel_db
|
||||||
|
|||||||
@@ -1,7 +1 @@
|
|||||||
DB_CONNECTION=mariadb
|
APP_KEY=
|
||||||
DB_HOST=mariadb
|
|
||||||
DB_PORT=3306
|
|
||||||
DB_DATABASE=laravel_db
|
|
||||||
DB_USERNAME=laravel_user
|
|
||||||
DB_PASSWORD=super_strong_password
|
|
||||||
APP_KEY=""
|
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
composer install
|
|
||||||
|
# Init the laravel directory
|
||||||
|
if ! [ -d "app" ] ; then
|
||||||
|
/opt/bitnami/scripts/laravel/entrypoint.sh /opt/bitnami/scripts/laravel/run.sh
|
||||||
|
else
|
||||||
|
composer install
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Create .env if it does not exist
|
# Create .env if it does not exist
|
||||||
if ! [ -e ".env" ] ; then
|
if ! [ -e ".env" ] ; then
|
||||||
@@ -8,4 +15,5 @@ if ! [ -e ".env" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
php artisan migrate --force
|
php artisan migrate --force
|
||||||
php artisan serve --host=0.0.0.0 --port=8000
|
|
||||||
|
/opt/bitnami/scripts/laravel/entrypoint.sh /opt/bitnami/scripts/laravel/run.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user