A docker compose setup meant for Laravel applications. This setup will create a php container, an nginx container and a PostgresSQL container
- Clone this repo:
git clone https://github.com/jasonheecs/laravel-docker-compose.git
cd laravel-docker-compose
- Run
make build
A Laravel app will be created in your src
folder
NETWORK_NAME=custom-network
XDEBUG_CONFIG=remote_host=host.docker.internal
Ensure you have the right remote_host
for XDebug specified. You may need to modify the config if host.docker.internal does not work for your OS.
Testing is done via Rspec
To run the tests:
gem install bundler
bundle install
bundle exec rspec
Refer to the travis.yml file and Travis build logs for details on the automated tests and expected outputs.
The Makefile
contains a list of utility commands meant for easy manipulation of the docker containers
make stop
Stops the running containersmake start
Starts the stopped containersmake connect
Opens an interactive shell session within the php containermake rebuild
Destroys and rebuilds the containersmake destroy
Destroys the containers
MIT