Skip to content

Instantly share code, notes, and snippets.

@thalysonalexr
Forked from andyshinn/composer.json
Created April 25, 2019 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thalysonalexr/3dc1d41aa950ca7a15067142cda5ecfb to your computer and use it in GitHub Desktop.
Save thalysonalexr/3dc1d41aa950ca7a15067142cda5ecfb to your computer and use it in GitHub Desktop.
Docker Compose PHP Composer Example
{
"require": {
"mfacenet/hello-world": "v1.*"
}
}
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
<?php
require 'vendor/autoload.php';
use HelloWorld\SayHello;
echo SayHello::world();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment