Skip to content

Commit

Permalink
chore: add platform.sh files (#3258)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin committed Dec 1, 2019
1 parent 5c23b7a commit b0fa44b
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# 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: monica

# The type of the application to build.
type: php:7.3
build:
flavor: none

runtime:
extensions:
- apcu
- gmp
- redis
- sodium

# The hooks that will be performed when the package is deployed.
hooks:
build: |
set -e
composer install --no-interaction --no-suggest --no-dev
composer require --update-no-dev platformsh/laravel-bridge
deploy: |
set -e
php artisan monica:update --force -vvv
# 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: "db:mysql"
rediscache: "cache:redis"
redissession: "cache:redis"

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

# The mounts that will be performed when the package is deployed.
mounts:
"storage/app/public":
source: local
source_path: "public"
"storage/framework/views":
source: local
source_path: "views"
"storage/framework/sessions":
source: local
source_path: "sessions"
"storage/framework/cache":
source: local
source_path: "cache"
"storage/logs":
source: local
source_path: "logs"
"bootstrap/cache":
source: local
source_path: "cache"
"/.config":
source: local
source_path: "config"

# The configuration of app when it is exposed to the web.
web:
locations:
"/":
root: "public"
index:
- index.php
allow: true
passthru: "/index.php"

workers:
queue:
size: S
commands:
start: |
php artisan queue:work --sleep=3 --tries=3
crons:
scheduler:
spec: '* * * * *'
cmd: 'php artisan schedule:run -v'
11 changes: 11 additions & 0 deletions .platform/routes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# The routes of the project.
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.

"https://www.{default}/":
type: upstream
upstream: "app:http"
"https://{default}/":
type: redirect
to: "https://www.{default}/"
6 changes: 6 additions & 0 deletions .platform/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
db:
type: mariadb:10.2
disk: 2048

cache:
type: redis:5.0

0 comments on commit b0fa44b

Please sign in to comment.