jdsantos / laravel-alpine-nginx-phpfpm-opcache-docker

LANPOD - Deployment recipe with Laravel + Alpine + NGINX + PHP-FPM + OPCache + Docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LANPOD

LANPOD - Deployment recipe featuring: Laravel + Alpine + NGINX + PHP-FPM + OPCache + Docker

This repository provides a recipe for deploying your Laravel 10 applications using Docker. The Docker setup includes Laravel 10, Alpine, Nginx, PHP-FPM, Supervisor and OPCache for optimized performance.

Getting Started

If you clone this repo, only Docker is required to be installed on your machine! Feel free to use and change in any way possible this template. Follow the steps below to set this up in your local environment and give it a try!

Prerequisites

Make sure you have Docker installed on your machine. You can download it from Docker's official website.

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/jdsantos/laravel-alpine-nginx-phpfpm-opcache-docker.git
  2. Navigate to the project directory:

    cd laravel-alpine-nginx-phpfpm-opcache-docker
  3. Build and run the Docker containers:

    docker-compose up -d --build
  4. Access your Laravel application at http://localhost:8080.

What's in the box?

The Docker setup includes the following components:

  • Alpine Linux: Lightweight Linux distribution for the base image.
  • Supervisor: Process control system to manage multiple processes.
  • Nginx: Web server for serving the Laravel application.
  • PHP-FPM: PHP FastCGI Process Manager for handling PHP requests.
  • OPCache: PHP Opcode caching for improved performance.

Customization

After cloning this repo, you should paste in your Laravel app code inside the "laravel" directory. If you prefer, copy only the following onto your project:

  • Dockerfile
  • entrypoint.sh
  • conf.d

It should work just fine!

Contributing

Any contributions to this project are more than welcome. Feel free to reach me and I will gladly include any improvements or ideas that you may have. Please, fork this repository, make any changes and submit a PR and let's get in touch!

Contributors

Jorge Santos
jdsantos
github.com/jdsantos

License

This project is open-source software licensed under the MIT license.

About

LANPOD - Deployment recipe with Laravel + Alpine + NGINX + PHP-FPM + OPCache + Docker

License:MIT License


Languages

Language:PHP 71.1%Language:Blade 26.1%Language:Shell 1.4%Language:Dockerfile 1.1%Language:JavaScript 0.3%