All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			
		
			
				
	
	
		
			35 lines
		
	
	
		
			744 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			744 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
# update application cache
 | 
						|
php artisan optimize
 | 
						|
 | 
						|
# perform DB migrations
 | 
						|
if [[ ! -f ./database/database.sqlite ]]; then
 | 
						|
    if [[ ! -f /data/database.sqlite ]]; then
 | 
						|
        echo "No database found. Creating."
 | 
						|
        touch /data/database.sqlite
 | 
						|
    fi
 | 
						|
    echo "No link to database. Linking database."
 | 
						|
    ln -s /data/database.sqlite ./database/database.sqlite
 | 
						|
fi
 | 
						|
 | 
						|
if [[ ! -f ./.env ]]; then
 | 
						|
    if [[ ! -f /data/.env ]]; then
 | 
						|
        echo "No enviroment found. Creating."
 | 
						|
        cp .env.example /data/.env
 | 
						|
    fi
 | 
						|
    echo "No link to environment. Linking environment."
 | 
						|
    ln -s /data/.env ./.env
 | 
						|
    php artisan key:generate
 | 
						|
fi
 | 
						|
 | 
						|
 | 
						|
 | 
						|
fi
 | 
						|
 | 
						|
php artisan migrate
 | 
						|
 | 
						|
# start the application
 | 
						|
 | 
						|
php-fpm -D &&  nginx -g "daemon off;"
 |