Skip to content

Commit 07d00f3

Browse files
minor #924 Add Upsun config (nicolas-grekas)
This PR was merged into the main branch. Discussion ---------- Add Upsun config | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | - | License | MIT Hello https://ai.symfony.com/ Commits ------- f973324 Add Upsun config
2 parents ebc8b8d + f973324 commit 07d00f3

File tree

3 files changed

+62
-1
lines changed

3 files changed

+62
-1
lines changed

.upsun/config.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
routes:
2+
"https://{all}/": { type: upstream, upstream: "app:http" }
3+
"http://{all}/": { type: redirect, to: "https://{all}/" }
4+
5+
services:
6+
7+
applications:
8+
app:
9+
source:
10+
root: "/ai.symfony.com"
11+
12+
type: php:8.4
13+
14+
runtime:
15+
extensions:
16+
17+
variables:
18+
php:
19+
opcache.preload: config/preload.php
20+
21+
build:
22+
flavor: none
23+
24+
web:
25+
locations:
26+
"/":
27+
root: "public/"
28+
expires: 1h
29+
passthru: "/index.php"
30+
31+
mounts:
32+
"/var/cache": { source: instance, source_path: var/cache }
33+
"/var/share": { source: storage, source_path: var/share }
34+
35+
hooks:
36+
build: |
37+
set -x -e
38+
39+
curl -fs https://get.symfony.com/cloud/configurator | bash
40+
NODE_VERSION=22 symfony-build
41+
42+
deploy: |
43+
set -x -e
44+
45+
symfony-deploy
46+
47+
crons:
48+
security-check:
49+
# Check that no security issues have been found for PHP packages deployed in production
50+
spec: '50 23 * * *'
51+
cmd: if [ "$PLATFORM_ENVIRONMENT_TYPE" = "production" ]; then croncape COMPOSER_ROOT_VERSION=1.0.0 COMPOSER_AUDIT_ABANDONED=ignore composer audit --no-cache; fi
52+
clean-expired-sessions:
53+
spec: '17,47 * * * *'
54+
cmd: croncape php-session-clean

ai.symfony.com/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"symfony/flex": true,
2828
"symfony/runtime": true
2929
},
30-
"bump-after-update": true,
3130
"sort-packages": true
3231
},
3332
"autoload": {

ai.symfony.com/php.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
allow_url_include=off
2+
display_errors=off
3+
display_startup_errors=off
4+
max_execution_time=30
5+
session.gc_probability=0
6+
session.use_strict_mode=On
7+
realpath_cache_ttl=3600
8+
zend.detect_unicode=Off

0 commit comments

Comments
 (0)