Skip to content

Commit 8378b71

Browse files
committed
Add SymfonyCloud configuration
1 parent e3c2f69 commit 8378b71

File tree

4 files changed

+59
-0
lines changed

4 files changed

+59
-0
lines changed

.symfony.cloud.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: carson-bot
2+
3+
type: php:7.3
4+
5+
runtime:
6+
extensions:
7+
- apcu
8+
- mbstring
9+
10+
11+
build:
12+
flavor: none
13+
14+
web:
15+
locations:
16+
"/":
17+
root: "web"
18+
expires: 1h
19+
passthru: "/app.php"
20+
21+
disk: 2048
22+
23+
mounts:
24+
"app/cache": { source: local, source_path: "var/cache" }
25+
"app/logs": { source: local, source_path: "var/logs" }
26+
27+
hooks:
28+
build: |
29+
set -x -e
30+
31+
# Remove the development front-controller if present
32+
(>&2 rm web/app.php_dev.php)
33+
34+
SYMFONY_ENV=prod composer install --prefer-dist --optimize-autoloader --classmap-authoritative --no-progress --no-ansi --no-interaction --no-dev
35+
(>&2 SYMFONY_ENV=prod bin/console cache:clear --no-warmup)
36+
(>&2 SYMFONY_ENV=prod bin/console cache:warmup)
37+
38+
# Keep the cache in a persistent directory
39+
# If your cache can be read-only, you can skip this step
40+
(>&2 mkdir -p tmp/cache && mv var/cache/prod tmp/cache/ && mv var/bootstrap.php.cache tmp/bootstrap.php.cache)
41+
42+
deploy: |
43+
set -x -e
44+
45+
# "install" cache
46+
# If your cache can be read-only, you can skip these steps
47+
rm -rf var/cache/prod
48+
cp -Rp tmp/bootstrap.php.cache var/bootstrap.php.cache
49+
cp -Rp tmp/cache/prod var/cache/

.symfony/routes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"https://{default}/": { type: upstream, upstream: "carson-bot:http" }
2+
"http://{default}/": { type: redirect, to: "https://{default}/" }

.symfony/services.yaml

Whitespace-only changes.

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+
assert.active=off
3+
display_errors=off
4+
display_startup_errors=off
5+
max_execution_time=30
6+
session.use_strict_mode=On
7+
realpath_cache_ttl=3600
8+
zend.detect_unicode=Off

0 commit comments

Comments
 (0)