Skip to content

Commit

Permalink
Merge pull request #300 from symfony-cmf/platform_sh
Browse files Browse the repository at this point in the history
added platform.sh config
  • Loading branch information
lsmith77 committed Nov 2, 2015
2 parents 07d4b3e + b0130f4 commit 62cd332
Show file tree
Hide file tree
Showing 8 changed files with 690 additions and 473 deletions.
20 changes: 9 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
composer.phar
app/cache/*
app/logs/*
app/config/parameters.yml
app/config/phpcr.yml
app/bootstrap.php.cache
app/app.sqlite
app/check.php
app/SymfonyRequirements.php
web/bundles/
web/js/
web/css/
app/cache/*
app/logs/*
web/media
web/assetic
build/
vendor/
vendor
app/config/parameters.yml
app/config/phpcr.yml
jackrabbit/
jackrabbit-standalone-*.jar
vagrant/.vagrant
app/bootstrap.php.cache
.idea/
app/SymfonyRequirements.php
/bin/
/app/app.sqlite
app/check.php
bin/
71 changes: 71 additions & 0 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This file describes an application. You can have multiple applications
# in the same project.

# The name of this app. Must be unique within a project.
name: php

# The toolstack used to build the application.
type: php:5.6
build:
flavor: symfony

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
#relationships:
# database: "mysql:mysql"

# The configuration of app when it is exposed to the web.
web:
# The public directory of the app, relative to its root.
document_root: "/web"
# The front-controller script to send non-static requests to.
passthru: "/app.php"
whitelist:
# slides
- ^/slides/.*\.html$

# CSS and Javascript.
- \.css$
- \.js$

# image/* types.
- \.gif$
- \.jpe?g$
- \.png$
- \.ico

# robots.txt.
- /robots\.txt$

# The size of the persistent disk of the application (in MB).
disk: 2048

# The mounts that will be performed when the package is deployed.
mounts:
"/app/cache": "shared:files/cache"
"/app/logs": "shared:files/logs"

# The hooks that will be performed when the package is deployed.
hooks:
build: |
rm web/app_dev.php
# place sqlite file into /tmp so that we can write to it during deploy
sed -i 's@%kernel.root_dir%/app.sqlite@/tmp/app.sqlite@' app/config/parameters.yml
app/console --env=prod assets:install -n --no-debug
app/console --env=prod assetic:dump -n --no-debug
deploy: |
# force clearing the cache
rm -rf app/cache
app/console doctrine:phpcr:init:dbal --drop -n
app/console doctrine:phpcr:repository:init -n
app/console doctrine:phpcr:fixtures:load -n
app/console --env=prod cache:warmup -n --no-debug
runtime:
extensions:
- name: blackfire
configuration:
server_id: "ce95eba9-2d90-48b7-ad75-fcad42e1bcab"
server_token: "ca7e32ac2d466ecfdf30b8ac43bdfef1304fc3feeb66e8906c1192b435e206f0"
3 changes: 3 additions & 0 deletions .platform/routes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"http://{default}/":
type: upstream
upstream: "php:php"
Empty file added .platform/services.yaml
Empty file.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ before_script:
- composer self-update
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo "memory_limit = 1024M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
- cp app/config/phpcr_${TRANSPORT}.yml.dist app/config/phpcr.yml
- cp app/config/parameters.yml.dist app/config/parameters.yml
- ./app/tests/travis_${TRANSPORT}.sh
- app/console doctrine:phpcr:workspace:create sandbox_test -e=test
- app/console doctrine:phpcr:repository:init -e=test
Expand Down
5 changes: 4 additions & 1 deletion app/Resources/views/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@
</div>
<div class="span12">
{% block footer %}
<p>Powered by <a href="http://cmf.symfony.com/">Symfony CMF</a> | Frontend editing funded in part by <a href="http://www.iks-project.eu/">IKS</a></p>
<p>Powered by <a href="http://cmf.symfony.com/">Symfony CMF</a>
| Frontend editing funded in part by <a href="http://www.iks-project.eu/">IKS</a>
| Hosting graciously sponsored by <a href="http://platform.sh/">platform.sh</a>
</p>
{% endblock %}
</div>
</div>
Expand Down
21 changes: 17 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"liip/imagine-bundle": "~1.0",
"wjzijderveld/check-bundles": "~1.1",
"helios-ag/fm-elfinder-bundle": "~1.4",
"burgov/key-value-form-bundle": "~1.0"
"burgov/key-value-form-bundle": "~1.0",
"incenteev/composer-parameter-handler": "~2.0"
},
"require-dev": {
"sensio/generator-bundle": "~2.3",
Expand All @@ -50,6 +51,7 @@
"minimum-stability": "stable",
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"WillemJan\\CheckBundles\\Composer\\CheckBundles::postPackageUpdate",
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
Expand All @@ -58,6 +60,7 @@
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"WillemJan\\CheckBundles\\Composer\\CheckBundles::postPackageUpdate",
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
Expand All @@ -67,6 +70,9 @@
]
},
"config": {
"platform": {
"php": "5.4"
},
"bin-dir": "bin"
},
"extra": {
Expand All @@ -76,9 +82,16 @@
],
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"incenteev-parameters": [
{
"file": "app/config/parameters.yml",
"env-map": {}
},
{
"file": "app/config/phpcr.yml",
"dist-file": "app/config/phpcr_doctrine_dbal.yml.dist"
}
],
"branch-alias": {
"dev-master": "1.3-dev"
}
Expand Down
Loading

0 comments on commit 62cd332

Please sign in to comment.