diff --git a/.upsun/config.yaml b/.upsun/config.yaml new file mode 100644 index 00000000..f5505de8 --- /dev/null +++ b/.upsun/config.yaml @@ -0,0 +1,54 @@ +routes: + "https://{all}/": { type: upstream, upstream: "app:http" } + "http://{all}/": { type: redirect, to: "https://{all}/" } + +services: + +applications: + app: + source: + root: "/ai.symfony.com" + + type: php:8.4 + + runtime: + extensions: + + variables: + php: + opcache.preload: config/preload.php + + build: + flavor: none + + web: + locations: + "/": + root: "public/" + expires: 1h + passthru: "/index.php" + + mounts: + "/var/cache": { source: instance, source_path: var/cache } + "/var/share": { source: storage, source_path: var/share } + + hooks: + build: | + set -x -e + + curl -fs https://get.symfony.com/cloud/configurator | bash + NODE_VERSION=22 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 + spec: '50 23 * * *' + cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape COMPOSER_ROOT_VERSION=1.0.0 COMPOSER_AUDIT_ABANDONED=ignore composer audit --no-cache; fi + clean-expired-sessions: + spec: '17,47 * * * *' + cmd: croncape php-session-clean diff --git a/ai.symfony.com/composer.json b/ai.symfony.com/composer.json index 0be0941a..9488a76f 100644 --- a/ai.symfony.com/composer.json +++ b/ai.symfony.com/composer.json @@ -27,7 +27,6 @@ "symfony/flex": true, "symfony/runtime": true }, - "bump-after-update": true, "sort-packages": true }, "autoload": { diff --git a/ai.symfony.com/php.ini b/ai.symfony.com/php.ini new file mode 100644 index 00000000..4900b7b0 --- /dev/null +++ b/ai.symfony.com/php.ini @@ -0,0 +1,8 @@ +allow_url_include=off +display_errors=off +display_startup_errors=off +max_execution_time=30 +session.gc_probability=0 +session.use_strict_mode=On +realpath_cache_ttl=3600 +zend.detect_unicode=Off