forked from bresam/ivory-google-map-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
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 (egeloen#198)
- Loading branch information
Showing
16 changed files
with
164 additions
and
42 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
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
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,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
COMPOSER_PREFER_LOWEST=${COMPOSER_PREFER_LOWEST-false} | ||
DOCKER_BUILD=${DOCKER_BUILD-false} | ||
SYMFONY_VERSION=${SYMFONY_VERSION-2.3.*} | ||
|
||
if [ "$DOCKER_BUILD" = true ]; then | ||
cp .env.dist .env | ||
|
||
docker-compose build | ||
docker-compose run --rm php composer update --prefer-source | ||
|
||
exit | ||
fi | ||
|
||
export DISPLAY=:99 | ||
/sbin/start-stop-daemon -Sbmq -p /tmp/xvfb_99.pid -x /usr/bin/Xvfb -- ${DISPLAY} -ac -screen 0, 1600x1200x24 | ||
|
||
curl http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.0.jar > selenium.jar | ||
curl http://chromedriver.storage.googleapis.com/2.12/chromedriver_linux64.zip > chromedriver.zip | ||
unzip chromedriver.zip | ||
|
||
java -jar selenium.jar -Dwebdriver.chrome.driver=./chromedriver > /dev/null 2>&1 & | ||
|
||
composer self-update | ||
|
||
composer require --no-update symfony/framework-bundle:${SYMFONY_VERSION} | ||
composer require --no-update --dev symfony/form:${SYMFONY_VERSION} | ||
composer require --no-update --dev symfony/templating:${SYMFONY_VERSION} | ||
composer require --no-update --dev symfony/yaml:${SYMFONY_VERSION} | ||
|
||
composer remove --no-update --dev friendsofphp/php-cs-fixer | ||
|
||
if [[ "$SYMFONY_VERSION" = *dev* ]]; then | ||
composer config minimum-stability dev | ||
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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DOCKER_BUILD=${DOCKER_BUILD-false} | ||
|
||
if [ "$DOCKER_BUILD" = false ]; then | ||
vendor/bin/phpunit --configuration phpunit.travis.xml --coverage-clover build/clover.xml | ||
fi | ||
|
||
if [ "$DOCKER_BUILD" = true ]; then | ||
docker-compose up -d | ||
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 |