Code Monkey home page Code Monkey logo

lamp-docker-php-skeleton's Introduction

Lamp Docker skeleton PHP + Nginx + Mysql + Redis

Stop installing the entire development stack on your local machine. This project will allow you to quickly start working with php. To install, you need to install docker locally.

Features

  • Simple and clear project structure;
  • Php the latest version 8.1 (can be changed if you need);
  • All necessary php extensions including composer and xDebug3;
  • Output all necessary logs (nginx, php, mysql, redis, supervisor), including slow mysql queries;
  • Supervisor support
  • Quick, easy setup for everything you need
  • Lots of useful examples

What's inside

Requirements

Before start work

To run the docker commands without using sudo you must add the docker group to your-user:

sudo usermod -aG docker your-user

For now, this project has been mainly created for Unix (Linux/MacOS). Perhaps it could work on Windows.

MacOS/Linux

curl -L https://raw.githubusercontent.com/krepysh-spec/lamp-docker-php-skeleton/main/install.sh | bash
# Or if you want it to be installed to a different path:
curl -L https://raw.githubusercontent.com/krepysh-spec/lamp-docker-php-skeleton/main/install.sh | bash -s mypath/

Manually

Clone current project:

git clone https://github.com/krepysh-spec/lamp-docker-php-skeleton.git && cd lamp-docker-php-skeleton

Create .env file from .env_example:

cp .env_example .env

or

make init

How start work

Fill configuration in .env file

Run bottom command for install application

make install

If you not change NGINX_HOST and NGINX_PORT in .env open in browser localhost

And you should see something like: Alt Text

Makefile

This file helps to quickly interact with the work of docker and additional features. Read about available commands make help

Commands:
  init                                     Init skeleton settings
  help                                     List of all commands in make file
  install                                  Install application
  add-host                                 Add nginx host to /etc/hosts file
  bash                                     Exec backend container
  build                                    Build docker-compose
  build-no-cache                           Build docker-compose without cache
  up                                       Up with demon docker containers
  down                                     Down docker containers
  stop                                     Stop docker containers
  clear-all-logs                           Clear all logs in folder /logs
  clear-logs-in folder=[FOLDER]            Clear logs in folder
  watch-log logFilePath=[PATH TO LOG FILE] Watch log file

Project tree

.
├── docker - [Docker settings]
│   ├── backend
│   │   ├── Dockerfile
│   │   ├── php
│   │   │   └── conf.d
│   │   │       ├── php.ini
│   │   │       └── xdebug.ini
│   │   └── supervisor
│   │       ├── conf.d
│   │       │   └── example.conf
│   │       └── supervisord.conf
│   ├── mysql
│   │   └── conf.d
│   │       └── my.cnf
│   └── nginx
│       └── nginx.conf
├── docker-compose.yml
├── logs - [All necessary logs are written here]
└── src - [Your workspace]

Project links (Default: http://127.0.0.1/)

More documentation

You can also read more information about the project

Doc README
xDebug configuration docs/xdebug.md
Code sniffer configuration docs/codesniffer.md

Support

For support, email [email protected] or telegram @krep1sh

License

MIT

lamp-docker-php-skeleton's People

Contributors

mykhailichenkoevgeniy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.