-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #942 Add platform.sh support (senghe, TheMilek)
This PR was merged into the 1.12 branch. Discussion ---------- Hi. I've already prepared a platform.sh setup configuration for Sylius. In a nearest future I'll push also a documentation for this feature into Sylius repository. I hope you like it 🖖 Commits ------- 576f1eb Add platform.sh configuration 47036cb Bump node version 4a6a7fd Add CRON hook to platform.app.yaml file 90e3542 Change CRON hook crons section in platform.app.yaml file cf624b9 Fixes after review 66cbe3e Bump node to 20 version
- Loading branch information
Showing
5 changed files
with
124 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
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,112 @@ | ||
name: sylius | ||
|
||
type: php:8.3 | ||
|
||
relationships: | ||
database: "db:mysql" | ||
|
||
disk: 2048 | ||
|
||
mounts: | ||
"config/jwt": | ||
source: local | ||
source_path: jwt | ||
"/var/cache": | ||
source: local | ||
source_path: cache | ||
"/var/log": | ||
source: local | ||
source_path: log | ||
"/var/sessions": | ||
source: local | ||
source_path: sessions | ||
"/public/assets": | ||
source: local | ||
source_path: assets | ||
"/public/bundles": | ||
source: local | ||
source_path: bundles | ||
"/public/uploads": | ||
source: local | ||
source_path: uploads | ||
"/public/media": | ||
source: local | ||
source_path: media | ||
|
||
web: | ||
locations: | ||
"/": | ||
root: "public" | ||
passthru: "/index.php" | ||
allow: true | ||
expires: -1 | ||
scripts: true | ||
'/assets/shop': | ||
expires: 2w | ||
passthru: true | ||
allow: false | ||
rules: | ||
'\.(css|js|jpe?g|png|gif|svgz?|ico|bmp|tiff?|wbmp|ico|jng|bmp|html|pdf|otf|woff2|woff|eot|ttf|jar|swf|ogx|avi|wmv|asf|asx|mng|flv|webm|mov|ogv|mpe|mpe?g|mp4|3gpp|weba|ra|m4a|mp3|mp2|mpe?ga|midi?)$': | ||
allow: true | ||
'/media/image': | ||
expires: 2w | ||
passthru: true | ||
allow: false | ||
rules: | ||
'\.(jpe?g|png|gif|svgz?)$': | ||
allow: true | ||
'/media/cache/resolve': | ||
passthru: "/index.php" | ||
expires: -1 | ||
allow: true | ||
scripts: true | ||
'/media/cache': | ||
expires: 2w | ||
passthru: true | ||
allow: false | ||
rules: | ||
'\.(jpe?g|png|gif|svgz?)$': | ||
allow: true | ||
|
||
variables: | ||
env: | ||
APP_ENV: 'prod' | ||
APP_DEBUG: 0 | ||
N_PREFIX: /app/.global | ||
|
||
build: | ||
flavor: composer | ||
|
||
dependencies: | ||
nodejs: | ||
n: "*" | ||
yarn: "*" | ||
php: | ||
composer/composer: '^2' | ||
|
||
crons: | ||
sylius-cancel-unpaid-orders: | ||
spec: "0 2 * * *" | ||
cmd: "php bin/console --env=prod sylius:cancel-unpaid-orders" | ||
sylius-remove-expired-carts: | ||
spec: "0 2 * * *" | ||
cmd: "php bin/console --env=prod sylius:remove-expired-carts" | ||
|
||
hooks: | ||
build: | | ||
set -e | ||
curl -fs https://get.symfony.com/cloud/configurator | bash | ||
n auto | ||
hash -r | ||
yarn install --frozen-lockfile | ||
yarn build:prod | ||
deploy: | | ||
set -e | ||
symfony-deploy | ||
rm -rf var/cache/* | ||
mkdir -p public/media/image | ||
bin/console sylius:fixtures:load -n | ||
bin/console lexik:jwt:generate-keypair --skip-if-exists | ||
bin/console assets:install --symlink --relative public | ||
bin/console cache:clear |
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 @@ | ||
/ |
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,7 @@ | ||
"https://{default}/": | ||
type: upstream | ||
upstream: "sylius:http" | ||
|
||
"https://www.{default}/": | ||
type: redirect | ||
to: "https://{default}/" |
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,3 @@ | ||
db: | ||
type: mysql:11.0 | ||
disk: 256 |