diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7f29fea --- /dev/null +++ b/.drone.yml @@ -0,0 +1,42 @@ + + +# Declare a pipeline +workspace: + base: /app + path: test +services: + web: + image: fpfis/php56-build + environment: + - DOCUMENT_ROOT=/app/test + +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 index.php + + run-code: + image: fpfis/php71-build + commands: + - php index.php + + check_http: + image: fpfis/php56-build + commands: + - wget http://web:8080/index.php + +# test-docker-compose: +# image: docker/compose +# commands: +# - docker-compose up + 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..3fb6119 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,23 @@ +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/index.php b/index.php index 03efc33..b90d519 100644 --- a/index.php +++ b/index.php @@ -7,7 +7,7 @@ $array = array( 'foo' => 'bar', - 'bar' => array('foo' => 'bar', 'bar' => 'baz' => 'test'), + 'bar' => array('foo' => 'bar', 'bar' => 'baz' , 'test' => 'test'), ); echo Yaml::dump($array);