-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added deployment Steps on Cloudways #7433
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
Changes from 5 commits
2ebeb14
e54c90a
cead35e
c0b2815
9c25f36
b0c7990
1239bf4
4d90932
65fc4c1
7a5b04e
bbdf189
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
.. index:: | ||
single: Deployment; Deploying to Cloudways Cloud Servers | ||
|
||
Deploying to Cloudways | ||
====================== | ||
|
||
Cloudways is a managed hosting provider for PHP based applications. This step by | ||
step article describes how to install Symfony on Cloudways servers and how to | ||
deploy Symfony applications using Git and SSH. | ||
|
||
Step 1: Prepare your server and application | ||
------------------------------------------- | ||
|
||
`Sign up`_ or login to your **Cloudways account** and create a new server by | ||
selecting PHP Stack from the **Select your Application** drop-down. Also, name | ||
your application, server and project accordingly. | ||
|
||
.. image:: /_images/deployment/cloudways/select-application.png | ||
:alt: Select PHP Stack in Drop down | ||
|
||
Step 2: Select Cloud Provider | ||
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. Select a Cloud Provider |
||
----------------------------- | ||
|
||
Now select your favorite cloud provider. You can select any one from the five | ||
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 we just write "Select your favorite cloud provider from the list of available providers."? This way we won't have to update the article every time a new provider gets added. 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. @xabbuh there is no plan to add more providers yet. so I am changing the line as you say. |
||
providers to install Symfony. | ||
|
||
.. image:: /_images/deployment/cloudways/select-provider.png | ||
:alt: Select cloud Provider | ||
|
||
Step 3: Select Server Size & Location | ||
------------------------------------- | ||
|
||
In the **Server Size** field, scale the server as your requirement (**1GB** | ||
is the minimum recommended size for Symfony applications). | ||
|
||
.. image:: /_images/deployment/cloudways/select-server-size.png | ||
:alt: Select server size | ||
|
||
Keeping the latency difference in mind, now select your server location in the | ||
**Location** field. | ||
|
||
.. image:: /_images/deployment/cloudways/select-server-location.png | ||
:alt: Select server location | ||
|
||
To launch your server, click on the **Launch** button at the bottom right side | ||
of the page. | ||
|
||
.. image:: /_images/deployment/cloudways/launch-server.png | ||
:alt: launch server | ||
|
||
Step 4: Server Timezone | ||
----------------------- | ||
|
||
Once the server is completely launched, set the server timezone, because Symfony | ||
requires to define a valid timezone for PHP. Under **Server Management**, go to | ||
**Settings & Packages.** | ||
|
||
.. image:: /_images/deployment/cloudways/server-management.png | ||
:alt: server management tab | ||
|
||
In **Basic** tab you can see **PHP Timezone.** Change the server timezone to the | ||
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. In the [...] |
||
appropriate value according to your location. | ||
|
||
.. image:: /_images/deployment/cloudways/server-timezone-1.png | ||
:alt: Select server timezone | ||
|
||
Step 5: SSH Terminal | ||
-------------------- | ||
|
||
After changing server timezone, in **Server Management** click on **Launch SSH | ||
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. [...] changing the server [...] |
||
Terminal** under **Master Credentials** where you can find your login | ||
credentials for SSH Terminal. | ||
|
||
.. image:: /_images/deployment/cloudways/master-credentials.png | ||
:alt: Cloudways Master Credentials | ||
|
||
Login to SSH with your Master Credentials. | ||
|
||
.. image:: /_images/deployment/cloudways/symfony-7.png | ||
:alt: login to SSH | ||
|
||
Since the application folder contains a ``index.php`` fie by default, remove it | ||
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. [...] an |
||
from your ``public_html/`` directory executing the ``rm -Rf *`` command. | ||
|
||
Step 6: Symfony Installation | ||
---------------------------- | ||
|
||
Now in your ``public_html/`` directory, run the following command to install | ||
Symfony 3 on your server: | ||
|
||
.. code-block:: terminal | ||
|
||
$ composer create-project symfony/framework-standard-edition your_project_name "3.1.*" | ||
|
||
This command will create a Symfony project in ``public_html/``. You can also | ||
change the version number to install any other Symfony version. | ||
|
||
Step 7: DB Information and Finishing Project Installation | ||
--------------------------------------------------------- | ||
|
||
Now Symfony will start downloading to your server. During downloading, it will | ||
ask for your database information. | ||
|
||
.. image:: /_images/deployment/cloudways/db-info.png | ||
:alt: database information | ||
|
||
You can find out your DB information under **Application Management** go to | ||
**Access detail** and see MySQL Access. | ||
|
||
.. image:: /_images/deployment/cloudways/mysql-access.png | ||
:alt: database information | ||
|
||
After providing database information, you will see the following screen which | ||
means that Symfony has been installed successfully. | ||
|
||
.. image:: /_images/deployment/cloudways/symfony-installed.png | ||
:alt: Final Symfony Installation | ||
|
||
Step 7: Running in Browser | ||
-------------------------- | ||
|
||
After a successful installation, in **Application Management** go to **Access | ||
detail** and copy your Application URL. | ||
|
||
.. image:: /_images/deployment/cloudways/mysql-access.png | ||
:alt: database information | ||
|
||
Open your favorite web browser and access to the "Symfony Welcome page" using | ||
the following URL: http://your_application_url/your_project_directory/web | ||
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. It looks wrong to me that you store your entire project in the publicly accessible document root. Is this really the way to go with Cloudways? 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. Yeah it should be 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. But that would still mean that all your project files will be publicly available. 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. @xabbuh No only Web directory is Publicly accessible. Rest are Private. 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. Then I don't understand why I should append the |
||
|
||
This is how the Symfony Welcome page should look like: | ||
|
||
.. image:: /_images/deployment/cloudways/symfony-home.png | ||
:alt: symfony homepage | ||
|
||
Finally your Symfony project is ready for development. | ||
|
||
.. _`Sign up`: https://platform.cloudways.com/signup |
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.
Prepare Your Server and Application
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.
Should we really add the step numbers in the headlines? This will require a lot of work when steps are not necessary any more in the future or new steps are to be added.