A Docker Compose work flow that sets up LEPP stack with Traefik integration for Laravel devlopment.
This laravel setup depends on TheNerdyHamster/compose-local-services. Which setups Traefik and PostgreSQL.
- Download and follow instructions on TheNerdyHamster/compose-local-services.
- Configure the labels in
docker-compose
to your liking. - Configure
.env
to you liking. - Run
$ docker-compsoe up -d
to start project.
- website -
template.localhost
- mailhog -
mail.template.localhost
- redis -
:6379
By default this configuration depends on compose-local-services
, which includes PostgreSQL.
If prefer to have one datbase container per project, you can add:
volumes:
pgsql:
services:
pgsql:
image: postgres:13
container_name: pgsql
restart: unless-stopped
tty: true
environment:
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PWD}
ports:
- 5432:5432
volumes:
- pgsql:/var/lib/postgresql/data
networks:
- laravel
Mailhog is the default tool for testing email and SMTP during local development for Laravel 8.
The Mailhog service is included in the docker-compose.yml
, but might be moved to local-services
in the future.
To see the dashboard and view any emails coming through the system, visit mail.template.localhost after running docker-compose up -d
.
- @Aschemlyun - Insperation from his Laravel - Docker compose setup