vinnizworld
12/11/2015 - 4:04 AM

Docker Compose PHP Composer Example

Docker Compose PHP Composer Example

<?php
require 'vendor/autoload.php';
use HelloWorld\SayHello;
echo SayHello::world();
app:
  restart: 'yes'
  image: php:7
  command: php -S 0.0.0.0:8000 /app/index.php
  ports:
    - "8000:8000"
  volumes:
    - .:/app

composer:
  restart: 'no'
  image: composer/composer:php7
  command: install
  volumes:
    - .:/app
{
    "require": {
        "mfacenet/hello-world": "v1.*"
    }
}