From aac747b4d553cf883eec693f5f7d7bf14ed189dc Mon Sep 17 00:00:00 2001 From: Kamil Grygierzec Date: Tue, 23 Apr 2024 17:55:18 +0200 Subject: [PATCH] Fixes after review --- .env.platform.dist | 1 - .node-version | 2 +- .platform.app.yaml | 57 ++++++++++++++++++++++++++++------------------ 3 files changed, 36 insertions(+), 24 deletions(-) delete mode 100644 .env.platform.dist diff --git a/.env.platform.dist b/.env.platform.dist deleted file mode 100644 index 74deee3556..0000000000 --- a/.env.platform.dist +++ /dev/null @@ -1 +0,0 @@ -DATABASE_URL=mysql://root@127.0.0.1/sylius_%kernel.environment%?charset=utf8mb4&serverVersion=mariadb-11.0.0 diff --git a/.node-version b/.node-version index cb406c60ce..3c032078a4 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -16.20.2 +18 diff --git a/.platform.app.yaml b/.platform.app.yaml index bdff75b606..7f3c158332 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -1,6 +1,6 @@ name: sylius -type: php:8.1 +type: php:8.3 relationships: database: "db:mysql" @@ -8,11 +8,30 @@ relationships: disk: 2048 mounts: - "/var/cache": "shared:files/cache" - "/var/log": "shared:files/log" - "/var/sessions": "shared:files/sessions" - "/public/uploads": "shared:files/uploads" - "/public/media": "shared:files/media" + "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: @@ -56,44 +75,38 @@ variables: N_PREFIX: /app/.global build: - flavor: none + flavor: composer dependencies: nodejs: n: "*" yarn: "*" - gulp-cli: "*" php: composer/composer: '^2' crons: - cancel-unpaid-orders: + sylius-cancel-unpaid-orders: spec: "0 2 * * *" - cmd: "php bin/console sylius:cancel-unpaid-orders" - generate-promotion-coupons: + cmd: "php bin/console --env=prod sylius:cancel-unpaid-orders" + sylius-remove-expired-carts: spec: "0 2 * * *" - cmd: "php bin/console sylius:promotion:generate-coupons" - php bin/console sylius:remove-expired-carts: - spec: "0 2 * * *" - cmd: "php bin/console sylius:cancel-unpaid-orders" - + cmd: "php bin/console --env=prod sylius:remove-expired-carts" + hooks: build: | set -e - cp .env.platform.dist .env.local - composer --no-ansi --no-interaction install --no-progress --prefer-dist --optimize-autoloader curl -fs https://get.symfony.com/cloud/configurator | bash n auto hash -r - yarn install - GULP_ENV=prod yarn build - + yarn install --frozen-lockfile + yarn build:prod + deploy: | set -e symfony-deploy rm -rf var/cache/* mkdir -p public/media/image - bin/console sylius:install -n 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