TheNerdyHamster / laravel-base

A Laravel Docker Compose enviorment with Traefik integration inspierd by @Aschmelyun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel base

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.

Requierments

Usage

  1. Download and follow instructions on TheNerdyHamster/compose-local-services.
  2. Configure the labels in docker-compose to your liking.
  3. Configure .env to you liking.
  4. Run $ docker-compsoe up -d to start project.

URLs and ports

  • website - template.localhost
  • mailhog - mail.template.localhost
  • redis - :6379

PostgreSQL container within project

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

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.

Credits

About

A Laravel Docker Compose enviorment with Traefik integration inspierd by @Aschmelyun


Languages

Language:PHP 80.4%Language:Blade 18.1%Language:Shell 0.8%Language:Dockerfile 0.6%