Skip to content

Commit

Permalink
feat(deployment): add platformsh
Browse files Browse the repository at this point in the history
  • Loading branch information
webmezenc committed Dec 31, 2018
1 parent 9df320f commit 395761d
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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: app

# The type of the application to build.
type: php:7.2
build:
flavor: composer

variables:
env:
# Tell Symfony to always install in production-mode.
APP_ENV: 'prod'
APP_DEBUG: 0

# The hooks that will be performed when the package is deployed.
hooks:
build: |
set -e
php bin/console assets:install --no-debug
php bin/console cache:clear
deploy: |
set -e
php bin/console assets:install --symlink --relative public
php bin/console doctrine:schema:update --force
php bin/console hautelook:fixtures:load
php bin/console cache:clear
# 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: "mysqldb:mysql"

# 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:
"/var/cache": "shared:files/cache"
"/var/log": "shared:files/log"
"/var/sessions": "shared:files/sessions"

# The configuration of app when it is exposed to the web.
web:
locations:
"/":
# The public directory of the app, relative to its root.
root: "public"
# The front-controller script to send non-static requests to.
passthru: "/index.php"
12 changes: 12 additions & 0 deletions .platform/routes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# The routes of the project.
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.

"https://{default}/":
type: upstream
upstream: "app:http"

"https://www.{default}/":
type: redirect
to: "https://{default}/"
3 changes: 3 additions & 0 deletions .platform/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mysqldb:
type: mysql:10.2
disk: 2048

0 comments on commit 395761d

Please sign in to comment.