From 02b6b958b8e30a4b2fd071d8e4edce5ebdb479b0 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Thu, 8 Mar 2018 16:44:41 +0000 Subject: [PATCH 1/5] Add dockerfile --- Dockerfile | 18 ++++++++++++++++++ docker-compose.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1b1724d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ + +# Base image : +FROM fpfis/php56-build + +# Create a folder for my app in the container +RUN mkdir /app + +# Make the image work in this directory by default +WORKDIR /app + +# Push my local files to the image +ADD . /app + +# Run composer install to get my app ready +RUN composer install + +# Specify which command to run when my container starts +#ENTRYPOINT [ "php", "/app/hello.php" ] diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..9a74da7 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,25 @@ +version: '2' +services: + + # Define a PHP webserver + php-webserver: + # Use a PHP image with apache + #image: fpfis/php56-dev + image: myapp + #working_dir: /app + # Define settings + environment: + - XDEBUG=true + - DOCUMENT_ROOT=/app + # 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 + + From 8b6ed0f52bbf13d007c070f79543855f4d59da9e Mon Sep 17 00:00:00 2001 From: vojenfr Date: Thu, 8 Mar 2018 17:46:52 +0100 Subject: [PATCH 2/5] Create .drone.yml --- .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 009dc73806d6916456efa19e7c95fdbcf9963eda Mon Sep 17 00:00:00 2001 From: vojenfr Date: Thu, 8 Mar 2018 17:55:33 +0100 Subject: [PATCH 3/5] Update 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 e2fde5aa705b9ee09ad4c39d7dc47c00f62a41cb Mon Sep 17 00:00:00 2001 From: vojenfr Date: Thu, 8 Mar 2018 17:58:07 +0100 Subject: [PATCH 4/5] Update index.php --- 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); From 599d9c25940e94dab701d844472f68fe00d4f22c Mon Sep 17 00:00:00 2001 From: vojenfr Date: Thu, 8 Mar 2018 18:02:08 +0100 Subject: [PATCH 5/5] Update index.php --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 277c056..60912ca 100644 --- a/index.php +++ b/index.php @@ -7,7 +7,7 @@ $array = array( 'foo' => 'bar', - 'bar' => array('foo' => 'bar', 'bar' => 'baz'), + 'bar' => array('foo' => 'bar', 'bar' => 'baz', 'test' => 'test') ); echo Yaml::dump($array);