File tree Expand file tree Collapse file tree 8 files changed +24
-18
lines changed
Filter options
Expand file tree Collapse file tree 8 files changed +24
-18
lines changed
Original file line number Diff line number Diff line change 9
9
"repository" : " https://github.com/symfony/symfony-demo" ,
10
10
"logo" : " https://symfony.com/images/v5/pictos/demoapp.svg?v=4" ,
11
11
"success_url" : " /" ,
12
+ "scripts" : {
13
+ "postdeploy" : " php bin/console doctrine:schema:create && php bin/console doctrine:fixtures:load -n"
14
+ },
12
15
"env" : {
13
16
"SYMFONY_ENV" : " prod" ,
17
+ "SYMFONY_LOG" : " php://stderr" ,
14
18
"SYMFONY_SECRET" : {
15
19
"description" : " Extra entropy for %kernel.secret%; used for CSRF tokens, cookies and signed URLs." ,
16
20
"generator" : " secret"
17
21
}
18
22
},
23
+ "addons" : [
24
+ " heroku-postgresql"
25
+ ],
19
26
"image" : " heroku/php"
20
27
}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public function registerBundles()
21
21
new WhiteOctober \PagerfantaBundle \WhiteOctoberPagerfantaBundle (),
22
22
new CodeExplorerBundle \CodeExplorerBundle (),
23
23
new AppBundle \AppBundle (),
24
+ new Doctrine \Bundle \FixturesBundle \DoctrineFixturesBundle (), // used for initial population of non-SQLite databases in production envs
24
25
// uncomment the following line if your application sends emails
25
26
// new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
26
27
];
@@ -34,7 +35,6 @@ public function registerBundles()
34
35
$ bundles [] = new Symfony \Bundle \WebProfilerBundle \WebProfilerBundle ();
35
36
$ bundles [] = new Sensio \Bundle \DistributionBundle \SensioDistributionBundle ();
36
37
$ bundles [] = new Sensio \Bundle \GeneratorBundle \SensioGeneratorBundle ();
37
- $ bundles [] = new Doctrine \Bundle \FixturesBundle \DoctrineFixturesBundle ();
38
38
}
39
39
40
40
return $ bundles ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ framework:
31
31
# http://symfony.com/doc/current/book/http_cache.html#edge-side-includes
32
32
esi : { enabled: true }
33
33
translator : { fallback: "%locale%" }
34
- secret : " %secret %"
34
+ secret : " %env(SYMFONY_SECRET) %"
35
35
router :
36
36
resource : " %kernel.root_dir%/config/routing.yml"
37
37
strict_requirements : ~
@@ -61,10 +61,10 @@ twig:
61
61
# Doctrine Configuration (used to access databases and manipulate their information)
62
62
doctrine :
63
63
dbal :
64
- # if you don't want to use SQLite, comment the two following lines
65
- driver : " pdo_sqlite "
66
- path : " %kernel.root_dir%/data/blog.sqlite "
67
- # uncomment the following lines to use a database different than SQLite
64
+ # if you don't want to use SQLite, change the URL in parameters.yml or set the DATABASE_URL environment variable
65
+ url : " %env(DATABASE_URL)% "
66
+
67
+ # instead of using a URL, you may also uncomment the following lines to configure your database
68
68
# driver: pdo_mysql
69
69
# host: "%database_host%"
70
70
# port: "%database_port%"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ monolog:
15
15
handlers :
16
16
main :
17
17
type : stream
18
- path : " %kernel.logs_dir%/%kernel.environment%.log "
18
+ path : " %env(SYMFONY_LOG)% "
19
19
level : info
20
20
console :
21
21
type : console
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ monolog:
19
19
handler : nested
20
20
nested :
21
21
type : stream
22
- path : " %kernel.logs_dir%/%kernel.environment%.log "
22
+ path : " %env(SYMFONY_LOG)% "
23
23
level : debug
24
24
console :
25
25
type : console
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ parameters:
6
6
# this demo application uses an embedded SQLite database to simplify setup.
7
7
# in a real Symfony application you probably will use a MySQL or PostgreSQL database
8
8
# the path must be relative or else it will not work on Windows
9
- database_url: 'sqlite:///%kernel.root_dir%/data/blog.sqlite'
9
+ env(DATABASE_URL): 'sqlite:///%kernel.root_dir%/data/blog.sqlite'
10
10
11
11
# Uncomment this line to use a MySQL database instead of SQLite:
12
12
#
13
- # database_url: 'mysql://root:pass@127.0.0.1:3306/symfony_demo'
13
+ # env(DATABASE_URL): 'mysql://root:pass@127.0.0.1:3306/symfony_demo'
14
14
#
15
15
# Furthermore, you must remove or comment out the "doctrine" section from config_dev.yml regarding SQLite!
16
16
#
@@ -35,4 +35,7 @@ parameters:
35
35
# used internally by Symfony in several places (CSRF tokens, URI signing,
36
36
# 'Remember Me' functionality, etc.)
37
37
# see: http://symfony.com/doc/current/reference/configuration/framework.html#secret
38
- secret: 'secret_value_for_symfony_demo_application'
38
+ env(SYMFONY_SECRET): 'secret_value_for_symfony_demo_application'
39
+
40
+ # Destination for log files; can also be "php://stderr" etc
41
+ env(SYMFONY_LOG): %kernel.logs_dir%/%kernel.environment%.log
Original file line number Diff line number Diff line change 64
64
"symfony-tests-dir" : " tests" ,
65
65
"symfony-assets-install" : " relative" ,
66
66
"incenteev-parameters" : {
67
- "file" : " app/config/parameters.yml" ,
68
- "env-map" : {
69
- "database_url" : " DATABASE_URL" ,
70
- "secret" : " SYMFONY_SECRET"
71
- }
67
+ "file" : " app/config/parameters.yml"
72
68
}
73
69
}
74
70
}
You can’t perform that action at this time.
0 commit comments