From 78e2bcbc09c46ca22c564ba0c67fba25bef31ab1 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Thu, 8 Mar 2018 15:50:27 +0000 Subject: [PATCH 1/4] Fix bad comma in composer.json. --- 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 049a4d65f45c19340959b72d0410c790068aa4cd Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Thu, 8 Mar 2018 16:21:22 +0000 Subject: [PATCH 2/4] Add Docker related files. --- Dockerfile | 18 ++++++++++++++++++ docker-compose.yaml | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..70f32cf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# Base image : +FROM fpfis/php71 + +# Create a folder for my app in the container +RUN mkdir /custom71 + +# Make the image work in this directory by default +WORKDIR /custom71 + +# Push my local files to the image +ADD . /custom71 + +# Run composer install to get my app ready +RUN composer install + +# Specify which command to run when my container starts +ENTRYPOINT [ "php", "/custom71/index.php" ] + diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..8d7ba27 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,20 @@ +version: '2' +services: + # Define a PHP webserver + php-webserver: + # Use a PHP image with apache + image: fpfis/php71 + # Define settings + environment: + - XDEBUG=true + - DOCUMENT_ROOT=/custom71/build + # Mount a local volume in the container + volumes: + - ./:/custom71/build + # Share the container port with the host + ports: + - 8080:8080 + + # Define a mysql service + mysql: + image: fpfis/mysql56 From 8f9ed384483024b41a4357471620069a922e75d2 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Thu, 8 Mar 2018 16:34:50 +0000 Subject: [PATCH 3/4] Add drone file. --- .drone.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..571a4eb --- /dev/null +++ b/.drone.yml @@ -0,0 +1,21 @@ +# 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 index.php + + run-code: + image: fpfis/php71-build + commands: + - php index.php + From 1bcf17cd641b2509a02be720a4c10b1bd6642d40 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Thu, 8 Mar 2018 16:39:24 +0000 Subject: [PATCH 4/4] Fix cs. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 03efc33..277c056 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'), ); echo Yaml::dump($array);