-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from palantirnet/circle-ubuntu-14.04
Update for use with Circle's Ubuntu 14.04 image
- Loading branch information
Showing
2 changed files
with
39 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ machine: | |
hosts: | ||
@[email protected]: 127.0.0.1 | ||
php: | ||
version: 5.6.14 | ||
version: 5.6.22 | ||
node: | ||
version: 0.12.0 | ||
environment: | ||
|
@@ -16,14 +16,22 @@ general: | |
|
||
dependencies: | ||
pre: | ||
- cp $HOME/$CIRCLE_PROJECT_REPONAME/conf/apache.circle.conf /etc/apache2/sites-available/default | ||
- sed -e "s?%PROJECT_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default | ||
# Workaround for broken symlink at /usr/lib/apache2/modules/libphp5.so | ||
- sudo unlink /usr/lib/apache2/modules/libphp5.so | ||
- sudo ln -s /opt/circleci/php/5.6.22/usr/lib/apache2/modules/libphp5.so /usr/lib/apache2/modules/libphp5.so | ||
# Disable XDebug | ||
- rm "/opt/circleci/php/$(phpenv global)/etc/conf.d/xdebug.ini" | ||
# Enable the Apache rewrite module | ||
- sudo a2enmod rewrite | ||
- echo "sendmail_path=/bin/true" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | ||
- echo "memory_limit=256M" > ~/.phpenv/versions/$(phpenv global)/etc/conf.d/memory.ini | ||
# Set up the project webroot | ||
- sudo cp $HOME/$CIRCLE_PROJECT_REPONAME/conf/apache.circle.conf /etc/apache2/sites-available/000-default.conf | ||
- sudo sed -e "s?%PROJECT_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf | ||
# Configure PHP | ||
- echo "sendmail_path=/bin/true" >> "/opt/circleci/php/$(phpenv version-name)/etc/php.ini" | ||
- echo "date.timezone=America/Chicago" >> "/opt/circleci/php/$(phpenv version-name)/etc/php.ini" | ||
- echo "memory_limit=256M" > "/opt/circleci/php/$(phpenv version-name)/etc/conf.d/memory.ini" | ||
# Finally, restart Apache | ||
- sudo service apache2 restart | ||
# Generate a GitHub token per project and add it to the CircleCI environment variables using the web UI. | ||
- composer config --global github-oauth.github.com $GITHUB_TOKEN | ||
|
||
override: | ||
- composer install --no-interaction | ||
|
@@ -43,4 +51,5 @@ test: | |
- vendor/bin/phing build install migrate | ||
|
||
override: | ||
- vendor/bin/phing code-review test | ||
- vendor/bin/phing code-review | ||
- vendor/bin/phing test |
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,22 @@ | ||
<VirtualHost *:80> | ||
UseCanonicalName Off | ||
DocumentRoot %PROJECT_DIR%/web | ||
|
||
<Directory %PROJECT_DIR%/web> | ||
Options FollowSymLinks | ||
AllowOverride All | ||
RewriteEngine On | ||
RewriteBase / | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule %PROJECT_DIR%/(.*)$ index.php/?q=$1 [L,QSA] | ||
Require all granted | ||
</Directory> | ||
|
||
<Directory /> | ||
Options FollowSymLinks | ||
AllowOverride None | ||
</Directory> | ||
|
||
SetEnv CIRCLECI true | ||
</VirtualHost> |