diff --git a/.platform.app.yaml b/.platform.app.yaml new file mode 100644 index 0000000..ba54392 --- /dev/null +++ b/.platform.app.yaml @@ -0,0 +1,67 @@ +name: app + +type: php:8.3 + +dependencies: + php: + composer/composer: "^2" + +runtime: + extensions: + - apcu + - blackfire + - ctype + - iconv + - mbstring + - pdo_pgsql + - sodium + - xsl + + +variables: + php: + opcache.preload: config/preload.php +build: + flavor: none + +disk: 1024 + +web: + locations: + "/": + root: "public" + expires: 1h + passthru: "/index.php" + +mounts: + "/var": { source: local, source_path: var } + + +relationships: + database: "database:postgresql" + +hooks: + build: | + set -x -e + + curl -fs https://get.symfony.com/cloud/configurator | bash + + NODE_VERSION=18 symfony-build + + deploy: | + set -x -e + + symfony-deploy + +crons: + security-check: + # Check that no security issues have been found for PHP packages deployed in production + # See https://github.com/fabpot/local-php-security-checker + spec: '50 23 * * *' + cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape php-security-checker; fi + +workers: + messenger: + commands: + # Consume "async" messages (as configured in the routing section of config/packages/messenger.yaml) + start: symfony console --time-limit=3600 --memory-limit=64M messenger:consume async diff --git a/.platform/routes.yaml b/.platform/routes.yaml new file mode 100644 index 0000000..90c6a1e --- /dev/null +++ b/.platform/routes.yaml @@ -0,0 +1,2 @@ +"https://{all}/": { type: upstream, upstream: "app:http" } +"http://{all}/": { type: redirect, to: "https://{all}/" } diff --git a/.platform/services.yaml b/.platform/services.yaml new file mode 100644 index 0000000..d40b0b6 --- /dev/null +++ b/.platform/services.yaml @@ -0,0 +1,6 @@ + +database: + type: postgresql:16 + disk: 1024 + + diff --git a/php.ini b/php.ini new file mode 100644 index 0000000..6efbd07 --- /dev/null +++ b/php.ini @@ -0,0 +1,7 @@ +allow_url_include=off +display_errors=off +display_startup_errors=off +max_execution_time=30 +session.use_strict_mode=On +realpath_cache_ttl=3600 +zend.detect_unicode=Off