This is a personal project to try and achieve a perfect, production ready Laravel starter kit that works with Docker. The goal is that we can just build a Docker Compose script which creates various services for a full Laravel app.
- Run
docker build -t laravel-in-docker .
- Run
cp .env.example .env
- Generate a random password in the
DB_PASSWORD
env variable - Run
docker compose up -d
- Run
git pull
- Run
docker build -t laravel-in-docker .
- Run
docker compose up -d
- NGINX Proxy Pointing to PHP-FPM
- Scheduler
- Laravel Queue
- Ability to set the max upload/max timeout
This is likely because the TRUSTED_PROXIES
env variable. This is usually set to 192.168.0.0/16
however this could
be set to something different. Your mileage may vary.
This docker-compose script contains a Caddy configuration. You can simply comment it out to enable it and configure your Caddyfile with your domain. It's also recommended to disable any outbound ports for the web as Caddy can handle all of this and the only ports you need to open will be 80 and 443.