Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Docker] Add hhvm container * [Travis] Reorganize scripts * [Travis] Add docker build * [Travis] Fix docker build
- Loading branch information
Showing
15 changed files
with
160 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
version: '2' | ||
|
||
services: | ||
php: | ||
build: docker | ||
php: &php | ||
build: docker/php | ||
env_file: | ||
- .env | ||
environment: | ||
USER_ID: ${USER_ID} | ||
GROUP_ID: ${GROUP_ID} | ||
SYMFONY_DEPRECATIONS_HELPER: ${SYMFONY_DEPRECATIONS_HELPER} | ||
XDEBUG: ${XDEBUG} | ||
XDEBUG_CONFIG: remote_host=${XDEBUG_HOST} remote_port=${XDEBUG_PORT} idekey=${XDEBUG_IDEKEY} | ||
PHP_IDE_CONFIG: serverName=${IDE_SERVER_NAME} | ||
volumes: | ||
- ~/.composer:/var/www/.composer | ||
- .:/var/www/html | ||
hhvm: | ||
<<: *php | ||
build: docker/hhvm |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM hhvm/hhvm:latest | ||
|
||
# APT packages | ||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# HHVM configuration | ||
RUN echo "hhvm.libxml.ext_entity_whitelist=file,http" >> /etc/hhvm/php.ini | ||
|
||
# XDebug configuration | ||
COPY config/xdebug.ini /var/www/xdebug.ini | ||
|
||
# Composer | ||
RUN curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin | ||
|
||
# Bash | ||
RUN chsh -s /bin/bash www-data | ||
|
||
# Permissions | ||
RUN chown www-data:www-data /var/www | ||
|
||
# Workdir | ||
WORKDIR /var/www/html | ||
|
||
# Entrypoint | ||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh | ||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
xdebug.cli_color=1 | ||
xdebug.enable=1 | ||
xdebug.remote_autostart=1 | ||
xdebug.remote_enable=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
GROUP_ID=${GROUP_ID-1000} | ||
USER_ID=${USER_ID-1000} | ||
XDEBUG=${XDEBUG-0} | ||
|
||
# Enable XDebug | ||
if [ ${XDEBUG} = 1 ]; then | ||
cat /var/www/xdebug.ini >> /etc/hhvm/php.ini | ||
fi | ||
|
||
# Remove XDebug temporary configuration | ||
rm -f /var/www/xdebug.ini | ||
|
||
# Permissions | ||
groupmod -g ${GROUP_ID} www-data | ||
usermod -u ${USER_ID} www-data | ||
|
||
# Start bash or forward command | ||
if [ "$1" = "bash" ]; then | ||
su www-data | ||
else | ||
su www-data -c "$*" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
xdebug.cli_color=1 | ||
xdebug.remote_enable=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
SYMFONY_VERSION=${SYMFONY_VERSION-2.3.*} | ||
COMPOSER_PREFER_LOWEST=${COMPOSER_PREFER_LOWEST-false} | ||
DOCKER_BUILD=${DOCKER_BUILD=false} | ||
|
||
if [ ${DOCKER_BUILD} = true ]; then | ||
cp .env.dist .env | ||
|
||
docker-compose build | ||
docker-compose run --rm php composer update --prefer-source | ||
|
||
exit | ||
fi | ||
|
||
composer self-update | ||
|
||
composer require --no-update symfony/framework-bundle:${SYMFONY_VERSION} | ||
composer require --no-update symfony/form:${SYMFONY_VERSION} | ||
composer require --no-update --dev symfony/templating:${SYMFONY_VERSION} | ||
composer require --no-update --dev symfony/twig-bridge:${SYMFONY_VERSION} | ||
composer require --no-update --dev symfony/yaml:${SYMFONY_VERSION} | ||
|
||
if [[ "$SYMFONY_VERSION" =~ ^2\.[2-6] ]]; then | ||
composer require --no-update --dev symfony/asset:2.7.* | ||
else | ||
composer require --no-update --dev symfony/asset:${SYMFONY_VERSION} | ||
fi | ||
|
||
composer remove --no-update --dev friendsofphp/php-cs-fixer | ||
|
||
if [[ "$SYMFONY_VERSION" = *dev* ]]; then | ||
sed -i "s/\"MIT\"/\"MIT\",\"minimum-stability\":\"dev\"/g" composer.json | ||
fi | ||
|
||
composer update --prefer-source `if [[ ${COMPOSER_PREFER_LOWEST} = true ]]; then echo "--prefer-lowest --prefer-stable"; fi` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DOCKER_BUILD=${DOCKER_BUILD=false} | ||
|
||
if [ ${DOCKER_BUILD} = false ]; then | ||
vendor/bin/phpunit --coverage-clover build/clover.xml | ||
fi | ||
|
||
if [ ${DOCKER_BUILD} = true ]; then | ||
docker-compose run --rm php vendor/bin/phpunit | ||
docker-compose run --rm hhvm vendor/bin/phpunit | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DOCKER_BUILD=${DOCKER_BUILD=false} | ||
|
||
if [ ${DOCKER_BUILD} = false ]; then | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover build/clover.xml | ||
fi |