Download the PHP package janole/laravel-dockerize without Composer
On this page you can find all versions of the php package janole/laravel-dockerize. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download janole/laravel-dockerize
More information about janole/laravel-dockerize
Files in janole/laravel-dockerize
Package laravel-dockerize
Short Description A very simple tool to containerize your Laravel app
License MIT
Informations about the package laravel-dockerize
laravel-dockerize
A very simple tool to containerize your Laravel App ...
What? Why?
Do you want to easily create a Docker image from your Laravel App? Then this project wants to become your friend ;-)
!! NOTICE !! So far, this project is severely limited to some base dependencies (like PostgreSQL for example.)
Installation
Usage
1. First, you need to specify the (base-)name of the docker image. Add the following variable to your .env
file:
or
If you're using git,
laravel-dockerize
will try to automatically add some version and branch tags to the image name.
2. Now build the image:
Yay! Now you've got your first image named my-shiny-new-app:0.1-master
!! NOTICE !! The Dockerfile used to create the image will be automatically saved in your project's root.
3. Create a docker-compose.yml file in the project root:
4. Run the project via docker-compose:
Internals ...
- laravel-dockerize will add another artisan command to your project:
container:startup
. This command will be automatically called each time the container is (re-)started and it will try to initialize the database for you. For this, it will wait for the database to be ready, callphp artisan migrate --force
and then try to run the initial seedersDOCKERIZE_SEED1
or updating seedersDOCKERIZE_SEED2
(if the database wasn't fresh.)
All versions of laravel-dockerize with dependencies
laravel/framework Version ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
vlucas/phpdotenv Version ^2|^3|^4|^5
ext-json Version *