Skip to content

Commit a8a67ea

Browse files
committed
Fixing env vars and using more compat php version with this old code
1 parent 1c1daad commit a8a67ea

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.symfony.cloud.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: carson-bot
22

3-
type: php:7.3
3+
type: php:7.2
44

55
runtime:
66
extensions:
@@ -35,8 +35,15 @@ hooks:
3535
(>&2 SYMFONY_ENV=prod app/console cache:clear --no-warmup)
3636
(>&2 SYMFONY_ENV=prod app/console cache:warmup)
3737
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 app/cache/prod tmp/cache/)
41+
3842
deploy: |
3943
set -x -e
4044
41-
(>&2 SYMFONY_ENV=prod app/console cache:clear --no-warmup)
42-
(>&2 SYMFONY_ENV=prod app/console cache:warmup)
45+
# "install" cache
46+
# If your cache can be read-only, you can skip these steps
47+
rm -rf app/cache/prod
48+
#cp -Rp tmp/bootstrap.php.cache app/bootstrap.php.cache
49+
cp -Rp tmp/cache/prod app/cache/

app/config/parameters.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
if (getenv('github_token')) {
4-
$container->setParameter('github_token', getenv('github_token'));
3+
if (getenv('GITHUB_TOKEN')) {
4+
$container->setParameter('github_token', getenv('GITHUB_TOKEN'));
55
}
66

7-
if (getenv('symfony_docs_secret')) {
8-
$container->setParameter('symfony_docs_secret', getenv('symfony_docs_secret'));
7+
if (getenv('SYMFONY_DOCS_SECRET')) {
8+
$container->setParameter('symfony_docs_secret', getenv('SYMFONY_DOCS_SECRET'));
99
}

0 commit comments

Comments
 (0)