mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
setup docker
This commit is contained in:
parent
be4c848eee
commit
d9f5e9770f
4 changed files with 57 additions and 137 deletions
21
docker-entrypoint.sh
Normal file
21
docker-entrypoint.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
mkdir -p /var/www/html/storage/framework/cache
|
||||
mkdir -p /var/www/html/storage/framework/sessions
|
||||
mkdir -p /var/www/html/storage/framework/views
|
||||
mkdir -p /var/www/html/storage/app/public
|
||||
mkdir -p /var/www/html/bootstrap/cache
|
||||
|
||||
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
|
||||
chown -R 775 /var/www/html/storage /var/www/html/bootstrap/cache
|
||||
|
||||
if [ -z "$(grep '^APP_KEY=' .env | grep -v '=$')" ]; then
|
||||
php artisan key:generate
|
||||
fi
|
||||
|
||||
if [ "$DB_HOST" != "" ]; then
|
||||
php artisan migrate
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue