-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes required for a Symfony project to run on ZEIT now.
* Add a `now.json` file with the required fields. Also add the environment variables here. * Add a `.nowignore` file to ignore the `var` and `vendor` directories among others (.env files also recommended). This will increase the upload/deployment time. * Change the cache and log directories in the Kernel: Edit the two methods in `src/Kernel.php`. * Add an `elseif` statement to `config/bootstrap.php` to do nothing if `NOW_REGION` exists and `NOW_REGION!=="dev1"`. This will prevent errors from the Dotenv package.
- Loading branch information
Showing
5 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
vendor | ||
var | ||
.git | ||
tests | ||
appveyor.yml | ||
.env* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "symfony-demo", | ||
"version": 2, | ||
"env": { | ||
"APP_ENV": "prod", | ||
"APP_DEBUG": "0", | ||
"APP_SECRET": "secret123", | ||
"DATABASE_URL": "sqlite:///%kernel.project_dir%/data/database.sqlite", | ||
"MAILER_URL": "null://localhost" | ||
}, | ||
"builds": [ | ||
{ "src": "public/index.php", "use": "@juicyfx/php@canary", "config": { "mode": "cgi", "composer": true } }, | ||
{ "src": "public/!(*.php)", "use": "@now/static" }, | ||
{ "src": "public/**/!(*.php)", "use": "@now/static" } | ||
], | ||
"routes": [ | ||
{ "src": "/apple-touch-icon.png", "dest": "public/apple-touch-icon.png"}, | ||
{ "src": "/favicon.ico", "dest": "public/favicon.ico"}, | ||
{ "src": "/robots.txt", "dest": "public/robots.txt"}, | ||
{ "src": "/build/(.*)", "dest": "public/build/$1"}, | ||
{ "src": "/(.*)", "dest": "public/index.php" } | ||
], | ||
"public": true, | ||
"scope": "ties" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters