This manual guide was provided as part of the original repo, and it is left here in case anyone wants to know how to manually do what is automated in the installer. (This means this guide is old and not maintained!).
Use it as inspiration for your own endeavors, perhaps.
First, do these steps:
- Global Install with Laravel Installer via Composer
- Edit your PATH to include composer bin files (like laravel)
Then, see these examples:
- Example 1: Using DockerLocal for local dev (with composer installed) and manual steps
- Example 2: Using DockerLocal ... & install-Laravel-Installer but not install-quick-laravel
Reference these post-install steps:
composer global require "laravel/installer"
nano ~/.bashrc
# Type the following into the bottom of the file:
export PATH="$HOME/.composer/vendor/bin:$PATH"
# Refresh the file
. ~/.bashrc
nano ~/.bash_profile
export PATH="$HOME/.composer/vendor/bin:$PATH"
Test is out, type echo $PATH
in terminal
cd /var/www/
or vhosts or similar code area in your environmentlaravel new app
where app is the name of the folder you want to use for your laravel project.- If using DockerLocal and ssh'd inside the web container,
cd /var/www/site/
and run this command to create the app folder there.
cd code/my-project/DockerLocal/commands && ./site-up && ./site-ssh -h=web
cd /var/www/
composer global require "laravel/installer"
nano ~/.bashrc
# type: export PATH="$HOME/.composer/vendor/bin:$PATH"
# reload bash config
. ~/.bashrc
echo $PATH
cd /var/www/site/
laravel new app
# change nginx.site.conf to point to /var/www/site/app/public && ./site-up
# change permissions on app/storage and app/bootstrap to 777
cd code/my-project/DockerLocal/commands && ./site-up && ./site-ssh -h=web
cd /var/www/site/commands
./install-laravel-installer
Now can use laravel command to make new app in /var/www/site
cd /var/www/site/
laravel new app-folder-name
# change nginx.site.conf to point to /var/www/site/app/public && ./site-up
# change permissions on app/storage and app/bootstrap to 777
- make sure you copy
app/.env-example
to.env
- make sure you add a 32 char length random string to
.env
under app_key viaphp artisan key:generate
, if it is missing- newer versions of laravel do this for you as a post composer command.
- make sure your nginx root path is pointing to the
app/public
folder (the installer will set it in DockerLocal/web-server-root with/var/www/site/app/public
, where it is relative to the container's path, not your computer) - make sure that
app/storage
andapp/bootstrap
arechmod 777
so that laravel can write to them. (The installer does this for you, in the Docker container)
Test your database connection by running the migration scripts (resources/database/migrations) (after editing your app/.env file to db connection info).
Using DockerLocal,
cd your-repo/DockerLocal/commands
./site-ssh -h=web
cd app
php artisan migrate