Laraduck is a simple nginx and php-fpm container to run php applications (such as Laravel). You can combine this with your own (or official) containers: MySQL, Redis, etc.
For version changes checkout the Github releases.
The only step for setup is mounting your php application to /opt/app
. The container will start your application from the /opt/app/public
directory.
To install Laravel into an empty repo, run the following command from that repo:
docker run --rm -v $(pwd):/opt/app samdevelopment/laraduck composer create-project --prefer-dist laravel/laravel .
Don't forget to set the correct permissions on Linux. (commands run from Laravel root dir)
sudo chown -R $(id -u):$(id -g) .
sudo chown -R www-data:www-data ./storage/ ./bootstrap/cache/
There are several environment variables available to customize your setup.
Variable | Default | Description |
---|---|---|
APP_PUBLIC_DIR |
public |
Choose the directory that serves as the entrypoint for php. Use . to set the root directory. |
APP_DOMAIN |
localhost |
Used to set the domain in the nginx configuration. |
APP_ENV |
development |
Change the Application Environment. Mainly used to enable or disable xdebug. |
APP_LOG_LEVEL |
notice |
Used to set the corresponding configuration value for php-fpm. |
There are several modules and packages installed to provide a complete development environment.
cli
, curl
, gd
, mbstring
, mcrypt
, mysql
, sqlite3
, xml
The Prestissimo Composer plugin is installed. This plugin enables parallel downloading for Composer.
Snakeoil is installed to easily provide self signed certificates through nginx. No setup is required.
Laraduck is open-sourced software licensed under the MIT license.