-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Endkind edited this page Mar 9, 2025
·
8 revisions
This repository contains a Docker Compose configuration to run a Laravel application with PostgreSQL, Redis, Apache, Scheduler, and Queue.
- Docker
- Docker Compose
- An existing Laravel project
This repository offers different versions of the Docker Compose configuration for various web servers:
- http: Apache server serving the Laravel application over HTTP only.
- http and https: Apache server serving the Laravel application over both HTTP and HTTPS.
- force https: Apache server serving the Laravel application over HTTPS only and redirecting HTTP requests to HTTPS.
For installation instructions for each version, see the corresponding links above.
- web: Apache server serving the Laravel application and migrating the database on each start.
- db: PostgreSQL database.
- redis: Redis server for caching and queues.
- scheduler: Container for scheduled Laravel tasks.
- queue: Container for Laravel queue processing.
If you do not use the Scheduler and Queue in Laravel, you can remove these services from the docker-compose.yml
file:
-
Open the
docker-compose.yml
file. -
Remove the following sections:
scheduler: # ...existing code... queue: # ...existing code...
-
To run a command in the
web
container:docker-compose exec web <command>
-
Example: Running Artisan commands:
docker-compose exec web php artisan <command>
This project is licensed under the MIT License. For more information, see the LICENSE file.