diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..bb6c9e6 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,17 @@ +pipeline: + composer-install: + 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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf6454f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM fpfis/php71-dev + +RUN mkdir /app +WORKDIR /app +ADD . /app + +RUN composer install + +ENTRYPOINT [ "php", "/app/index.php" ] 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.yml b/docker-compose.yml new file mode 100644 index 0000000..9e94334 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '2' +services: + + web: + image: fpfis/php71-dev + working_dir: /var/www/html + ports: + - 8080:8080 + volumes: + - .:/var/www/html + environment: + COMPOSER_MEMORY_LIMIT: "2G" diff --git a/index.php b/index.php index 03efc33..7a532a7 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', 'baz' => 'test'), ); echo Yaml::dump($array);