From b435af0b49e6347765b8bd1d30def9207ef2eafe Mon Sep 17 00:00:00 2001 From: Francesco Sardara Date: Thu, 8 Mar 2018 16:27:17 +0100 Subject: [PATCH 1/5] Fix composer.json syntax error. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" : "*" } } From 288591dfe740d1276029106bd9439151fb63b130 Mon Sep 17 00:00:00 2001 From: Francesco Sardara Date: Thu, 8 Mar 2018 16:29:48 +0100 Subject: [PATCH 2/5] Add drone configuration. --- .drone.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..9dad3b0 --- /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 \ No newline at end of file From f0fec564c3f285803766aa9699ee5da9f86c97dc Mon Sep 17 00:00:00 2001 From: Francesco Sardara Date: Thu, 8 Mar 2018 16:32:38 +0100 Subject: [PATCH 3/5] Oh noes there's also a php syntax error. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); From 6bebf9fbfb514b00dd299c6721bf51d1661c4bd0 Mon Sep 17 00:00:00 2001 From: Francesco Sardara Date: Thu, 8 Mar 2018 17:07:50 +0100 Subject: [PATCH 4/5] Add empty line at the end of drone file. --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 9dad3b0..bb6c9e6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,4 +14,4 @@ pipeline: run-code: image: fpfis/php71-build commands: - - php index.php \ No newline at end of file + - php index.php From 4fc35cbb32ce9c5fc73edbb9cdbabe868c4eb8e7 Mon Sep 17 00:00:00 2001 From: Francesco Sardara Date: Thu, 8 Mar 2018 17:11:00 +0100 Subject: [PATCH 5/5] Add Dockerfile and docker-compose support. --- Dockerfile | 9 +++++++++ docker-compose.yml | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml 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/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"