A suite of Docker images, Rancher Catalog Templates, and documentation for running a Laravel-centric web stack in Docker.
Inspired by Laravel Forge
A production PHP & Nginx environment inspired by Laravel Forge's provisioning scripts. Thanks, Taylor!
To start a container:
sudo docker run -itd bridgeconx/ldock-phpnginx
Nginx is configured to listen on port 80. The -p flag is formatted {port_on_host}:{port_in_container}.
sudo docker run -itd \
-p 80:80 \
bridgeconx/ldock-phpnginx
Mount a data volume into /var/www/public, where nginx is directing PHP requests to.
sudo docker run -itd \
-v /path/on/host/laravel:/var/www \
bridgeconx/ldock-phpnginx
This behavior is still very primitive, but you are able to run a queue worker (php /var/www/artisan queue:listen) in a separate container. Use the volumes from your main container. On boot, the container will wait for confirmation that Laravel has been installed (again, primitive), and then start your worker.
sudo docker run -itd \
-v /path/on/host/laravel:/var/www \
bridgeconx/ldock-phpnginx \
/bin/bash /root/schedule-run.sh
I can't emphasize enough... PRIMITIVE! I would not consider this usable in production.
Sets the home directory for Composer. default: /root/.composer
Set to a non-empty string to disable composer install --no-dev. Only applies when GIT_URL is defined.
Set to the Consul prefix to run confd. You must link consul to the container for this to work. Any KV values under /PREFIX/env will populate the .env file.
Full Git URL to a repository. If provided, this will trigger the following actions:
/var/www directory!/var/www./var/www/storage directory to www-data:www-data, unless disabled with STORAGE_WRITABLE.GitHub Personal Access Token. Used to prevent GitHub API Rate Limiting. Get one here: https://github.com/settings/tokens.
Not even going to document this. Do not use it.
Command to be executed after Composer dependencies are installed. Executed as sh -c "$POST_INSTALL".
Command to be executed before Composer dependencies are installed. Executed as sh -c "$PRE_INSTALL".
Set to a non-empty string to disable php /var/www/artisan schedule:run scheduling. This will effectively schedule the following cron: * * * * * * php /var/www/artisan schedule:run. Only applies when GIT_URL is defined.
Set to a non-empty string to disable chmod -R www-data:www-data /var/www/storage. Only applies when GIT_URL is defined.
Hostname of a private Toran Proxy. When provided, Composer will be configured for HTTP Basic Auth on your toran proxy using the provided TORAN_HTTP_USER and TORAN_HTTP_PASS (both required). Your composer.json file will still need to reference the Toran Proxy in the repositories config.
HTTP Basic Auth Username for a Toran Proxy located at TORAN_HOST. sometimes required
HTTP Basic Auth Password for a Toran Proxy located at TORAN_HOST. sometimes required
Content type
Image
Digest
Size
251.3 MB
Last updated
over 10 years ago
docker pull bridgeconx/ldock-phpnginx