-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Updates to Platform.sh deploy instructions #8397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -39,23 +39,25 @@ Platform.sh how to deploy your application (read more about | |
name: myphpproject | ||
|
||
# The type of the application to build. | ||
type: php:5.6 | ||
type: php:7.1 | ||
build: | ||
flavor: symfony | ||
flavor: composer | ||
|
||
# The relationships of the application with services or other applications. | ||
# The left-hand side is the name of the relationship as it will be exposed | ||
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand | ||
# side is in the form `<service name>:<endpoint name>`. | ||
relationships: | ||
database: 'mysql:mysql' | ||
database: 'mydatabase:mysql' | ||
|
||
# The configuration of app when it is exposed to the web. | ||
web: | ||
# The public directory of the app, relative to its root. | ||
document_root: '/web' | ||
# The front-controller script to send non-static requests to. | ||
passthru: '/app.php' | ||
locations: | ||
'/': | ||
# The public directory of the app, relative to its root. | ||
root: 'web' | ||
# The front-controller script to send non-static requests to. | ||
passthru: '/app.php' | ||
|
||
# The size of the persistent disk of the application (in MB). | ||
disk: 2048 | ||
|
@@ -73,21 +75,21 @@ Platform.sh how to deploy your application (read more about | |
deploy: | | ||
bin/console --env=prod cache:clear | ||
|
||
For best practices, you should also add a ``.platform`` folder at the root of | ||
You also need add a ``.platform`` folder at the root of | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to add |
||
your Git repository which contains the following files: | ||
|
||
.. code-block:: yaml | ||
|
||
# .platform/routes.yaml | ||
"http://{default}/": | ||
'https://{default}/': | ||
type: upstream | ||
# the first part should be your project name | ||
upstream: 'myphpproject:php' | ||
upstream: 'myphpproject:http' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be: 'https://{default}/':
type: upstream
upstream: "myphpproject:http"
'https://www.{default}/':
type: redirect
to: "https://{default}/" |
||
|
||
.. code-block:: yaml | ||
|
||
# .platform/services.yaml | ||
mysql: | ||
mydatabase: | ||
type: mysql | ||
disk: 2048 | ||
|
||
|
@@ -155,7 +157,7 @@ Commit the Platform.sh specific files created in the previous section: | |
|
||
.. code-block:: terminal | ||
|
||
$ git add .platform.app.yaml .platform/* | ||
$ git add .platform.app.yaml .platform/*.yaml | ||
$ git add app/config/config.yml app/config/parameters_platform.php | ||
$ git commit -m "Adding Platform.sh configuration files." | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you change this?
symfony
is correctThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read somewhere that
composer
is the new and recommended type for all PHP. Their Symfony template doc use that too: https://docs.platform.sh/frameworks/symfony.htmlThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to know, thank you @javiereguiluz 👍