A light docker environment that runs a basic laravel/php solution
- php-fpm alpine
- mysql
- nginx alpine
- Clone this repository
- Place your source code inside the
src
directory (i.e. place the root of the laravel project inside the src) - Rename
example-env
to.env
inorder to be consumed by docker and update the configs as of your taste - Leave the data directory untouched , the
mysql
database will be mounted here to insure persistance
Inside the docker
directory issue the commands below
docker-compose build
docker-compose up -d
Apply the following command inside src folder
docker run --rm --interactive --tty \
--volume $PWD:/app \
composer install
docker-compose run php php artisan migrate