-
-
Save twarnicki/fe3f9926222d574d751bd7beba84ecc2 to your computer and use it in GitHub Desktop.
Docker Compose PHP Composer Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "require": { | |
| "mfacenet/hello-world": "v1.*" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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