Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST from Florin #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -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

18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Base image :
FROM fpfis/php56-build

# Create a folder for my app in the container
RUN mkdir /app
RUN mkdir /app/build

# Make the image work in this directory by default
WORKDIR /app/build

# Push my local files to the image
ADD . /app/build

# Run composer install to get my app ready
RUN composer install

# Specify which command to run when my container starts
ENTRYPOINT [ "php", "/app/build/index.php" ]
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": {
"symfony/yaml" : "*",
"symfony/yaml" : "*"
}
}
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

$array = array(
'foo' => 'bar',
'bar' => array('foo' => 'bar', 'bar' => 'baz' => 'test'),
'bar' => array('foo' => 'bar', 'bar' => 'test'),
);

echo Yaml::dump($array);
echo "\n\n<br><br>Job done - Florin :)\n\n";
7 changes: 7 additions & 0 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit2729c6403636e0f04b1292f18ecd46f2::getLoader();
Loading