Giter VIP home page Giter VIP logo

docker-php-stack's Introduction

Docker PHP Stack

Run a PHP stack in Docker. It includes:

  • PHP 5.6 FPM
  • Nginx
  • PostgreSQL
  • MariaDB
  • Memcached
  • Redis

Requirements

Install Docker and Compose

Configuration

Usage

To start the stack, run docker-compose up -d.

To see the logs, run docker-compose logs -f

To stop the stack, run docker-compose stop

Composer

To run composer use the following command:

docker-compose exec --user 1000 phpfpm composer <command>

If you don't like typing, you can use the following alias.

alias composer='docker-compose exec --user 1000 phpfpm composer'

You should run this command within the project folder or a child.

If you have a local composer installed, the alias will probably override it.

PHP CLI

To use PHP CLI use the following command:

docker-compose exec --user 1000 phpfpm php

If you don't like typing, you can use the following alias.

alias php='docker-compose exec --user 1000 phpfpm php'

You should run this command within the project folder or a child.

If you have a local php installed, the alias will probably override it.

NOTE:

The provided UID (1000 in this case) is the host UID. It must match the UID of the www-data user in the guest container. If both UIDs don't match, update the file docker/php56/Dockerfile, line 50 and replace the number 1000 with your own UID and GUI. You can find those numbers by running echo $(id -u $USER):$(id -g $USER)

=====================

NOTE 2:

These alias will only work within the project directory, and only if the stack is running.

=====================

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.