diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7921474 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,20 @@ +# Declare a pipeline +pipeline: + # Declare pipeline step + composer-install: + # Use image for step + image: fpfis/php71-build + # Run commands from this image + commands: + - composer install --ansi + + # Declare another step + lint-code: + image: fpfis/php71-build + commands: + - php -l hello.php + + run-code: + image: fpfis/php71-build + commands: + - php hello.php diff --git a/README.md b/README.md new file mode 100644 index 0000000..e3b5fcf --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# docker-pratice - Local drone +Pratice repository for docker/drone training diff --git a/composer.json b/composer.json index e7ac977..00e7dd8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { "require": { - "symfony/yaml" : "*", + "symfony/yaml" : "*" } } diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..327d795 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,22 @@ +version: '2' +services: + + # Define a PHP webserver + php-webserver: + # Use a PHP image with apache + image: fpfis/php56-dev + # Define settings + environment: + - XDEBUG=true + - DOCUMENT_ROOT=/app/build + # Mount a local volume in the container + volumes: + - ./:/app/build + # Share the container port with the host + ports: + - 8080:8080 + + # Define a mysql service + mysql: + image: fpfis/mysql56 + diff --git a/hello.php b/hello.php new file mode 100644 index 0000000..03abdf6 --- /dev/null +++ b/hello.php @@ -0,0 +1,14 @@ + 'bar', + 'bar' => array('foo' => 'bar', 'bar' => 'baz'), +); + +echo Yaml::dump($array); +