mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Merge branch '1.12' into 1.13
* 1.12: [Docs] Remove outdated deployment entries
This commit is contained in:
commit
2aed391541
6 changed files with 0 additions and 376 deletions
|
|
@ -1,76 +0,0 @@
|
|||
How to deploy Sylius to Artifakt.com
|
||||
====================================
|
||||
|
||||
1. What is Artifakt?
|
||||
--------------------
|
||||
|
||||
`Artifakt <https://www.artifakt.com/>`_ is an all-in-one platform helping enterprises and developers fast-track deployments,
|
||||
manage and run complex web applications on enterprise-grade cloud infrastructures on a global scale.
|
||||
|
||||
2. How does Artifakt work?
|
||||
--------------------------
|
||||
|
||||
Artifakt provides a service based on Cloud technologies to help build, deploy, monitor, secure, and manage the scalability of your applications.
|
||||
|
||||
3. Create an Artifakt project
|
||||
-----------------------------
|
||||
|
||||
To get off to a good start with Artifakt, you first need to create a project.
|
||||
|
||||
Click Create Project in the left menu and follow the steps to create your first project.
|
||||
The project code must be unique within the workspace, you can refer to projects for more information.
|
||||
|
||||
.. image:: /_images/cookbook/deployment/artifakt/create_project.png
|
||||
:scale: 55%
|
||||
:align: center
|
||||
|
||||
In the second step, select the Sylius runtime and version that corresponds to the application you want to deploy.
|
||||
Also, choose the `region <https://docs.artifakt.com/platform/available-regions>`_ where your application and data will be deployed.
|
||||
When you create a project, you can use the default Artifakt code base for the chosen Sylius runtime, or you can link your own Git repository.
|
||||
If you wish to use the Artifakt default code base, simply click "Skip, and Create Project". Otherwise, you can choose the location of your repository and choose your preferred repository and default branch.
|
||||
If you did not link your Git repository during the project creation, you can do so afterwards by going to `Project → Settings → Environments` and clicking Link to a different repository so that you can then create environments using your application's source code.
|
||||
|
||||
.. image:: /_images/cookbook/deployment/artifakt/github_settings.png
|
||||
:scale: 55%
|
||||
:align: center
|
||||
|
||||
.. hint::
|
||||
|
||||
If you don't have an account on **Artifakt.com**, you should request a demo or contact support first.
|
||||
|
||||
4. Create an environment
|
||||
------------------------
|
||||
|
||||
Once the project is created, you can create your first environment. To do so, go to your project and click on **New Environment**.
|
||||
When creating an environment, you must define a name, the Git branch to deploy, the `type of platform <https://docs.artifakt.com/platform/platform-management>`_ to use, and the `criticality <https://docs.artifakt.com/platform/environment-lifecycle#environnement-et-criticite>`_ (environments can be either `critical` or `noncritical`).
|
||||
|
||||
.. image:: /_images/cookbook/deployment/artifakt/create_environment.png
|
||||
:scale: 55%
|
||||
:align: center
|
||||
|
||||
If you set up your Git repository at the project level, the branches associated with your repository are automatically retrieved and available in the drop-down list.
|
||||
|
||||
5. Building the environment
|
||||
---------------------------
|
||||
|
||||
Once your environment has been created, you can now launch its construction by clicking on **Build** in the drop-down menu.
|
||||
You will then be redirected to the Overview page of the environment, from where you can follow the creation and start up of each service of the platform, in real time.
|
||||
|
||||
.. image:: /_images/cookbook/deployment/artifakt/build.png
|
||||
:scale: 55%
|
||||
:align: center
|
||||
|
||||
Once the environment is deployed and available online, a domain name generated by Artifakt will be displayed in the list of project environments and on the environment home page.
|
||||
|
||||
.. image:: /_images/cookbook/deployment/artifakt/domain_name.png
|
||||
:scale: 55%
|
||||
:align: center
|
||||
|
||||
An Artifakt page will indicate that your environment's infrastructure has been created. You will then have to deploy your application source code when you are ready.
|
||||
|
||||
.. image:: /_images/cookbook/deployment/artifakt/deploy.png
|
||||
:scale: 55%
|
||||
:align: center
|
||||
|
||||
|
||||
Bravo! 🥳 💯 Your application is online thanks to Artifakt!
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
How to deploy Sylius to Cloudways PHP Hosting?
|
||||
==============================================
|
||||
|
||||
Cloudways is a managed hosting platform for custom PHP apps and PHP frameworks such as Symfony, Laravel, Codeigniter, Yii,
|
||||
CakePHP and many more. You can launch the servers on any of the five providers including DigitalOcean, Vultr, AWS, GCE and KYUP containers.
|
||||
|
||||
The deployment process of Sylius on Cloudways is pretty much straightforward and easy.
|
||||
|
||||
Now to install Sylius you need to go through series of few steps:
|
||||
|
||||
1. Launch Server with Custom PHP App
|
||||
------------------------------------
|
||||
|
||||
You should `signup at Cloudways <https://platform.cloudways.com/signup>`_ to buy the PHP servers from the above mentioned providers. Simply go to the pricing page and choose your required plan.
|
||||
You then need to go through the verification process. Once it done login to platform and launch your first Custom PHP application. You can follow the Gif too.
|
||||
|
||||
.. image:: ../../_images/cloudways-php-server.gif
|
||||
:align: center
|
||||
|
||||
Now let’s start the process of installing Sylius on Cloudways.
|
||||
|
||||
2. Install the latest version of Sylius via SSH
|
||||
-----------------------------------------------
|
||||
|
||||
Open the SSH terminal from the **Server Management tab**. You can also use PuTTY for this purpose. Find the SSH credentials under
|
||||
the **Master Credentials** heading and login to the SSH terminal:
|
||||
|
||||
.. image:: ../../_images/cloudways-ssh.png
|
||||
:align: center
|
||||
|
||||
After the login, move to the application folder using the ``cd`` command and run the following command to start installing Sylius:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
composer create-project sylius/sylius-standard myshop
|
||||
|
||||
The command will start installing the long list of dependencies for Sylius. Once the installation finishes, Sylius will ask for the database credentials.
|
||||
You can find the database username and password in the Application Access Details.
|
||||
|
||||
.. image:: ../../_images/cloudways-database.png
|
||||
:align: center
|
||||
|
||||
Enter the database details in the SSH terminal:
|
||||
|
||||
.. image:: ../../_images/cloudways-sylius-database.png
|
||||
:align: center
|
||||
|
||||
Keep the rest of the values to default so that the config file will have the defaults Sylius settings.
|
||||
If the need arises, you can obviously change these settings later.
|
||||
|
||||
|
||||
3. Install Node Dependencies
|
||||
----------------------------
|
||||
|
||||
Sylius requires several Node packages, which also needs to be installed and updated before setting up the shop. In addition, I also need to start and setup Webpack.
|
||||
|
||||
Now move to the myshop folder by using ``cd myshop`` and run the following command ``yarn install``. Once the command finishes, run the next command, ``yarn build``.
|
||||
|
||||
4. Install Sylius for the production environment
|
||||
------------------------------------------------
|
||||
|
||||
Now run the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
bin/console sylius:install -e prod
|
||||
|
||||
5. Update The Webroot of the Application
|
||||
----------------------------------------
|
||||
|
||||
Finally, the last step is to update the webroot of the application in the Platform. Move to the **Application Settings** tab and update it.
|
||||
|
||||
.. image:: ../../_images/cloudways-sylius-webroot.png
|
||||
:align: center
|
||||
|
||||
Now open the application URL as shown in the Access Details tab.
|
||||
|
||||
Learn more
|
||||
----------
|
||||
|
||||
* Cloudways PHP Hosting documentation: `How to host PHP applications on DigitalOcean via Cloudways <https://cloudways.com/blog/host-php-on-digitalocean>`_
|
||||
* PHP FAQs And Features: `Know more about PHP Hosting <https://cloudways.com/en/php-cloud-hosting.php>`_
|
||||
* `What You As A User Can Do With Cloudways PHP Stack <https://cloudways.com/blog/php-stack-user-guide>`_
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
* :doc:`/cookbook/deployment/platform-sh`
|
||||
* :doc:`/cookbook/deployment/cloudways`
|
||||
* :doc:`/cookbook/deployment/cron-jobs`
|
||||
* :doc:`/cookbook/deployment/symfonycloud`
|
||||
* :doc:`/cookbook/deployment/artifakt`
|
||||
* :doc:`/cookbook/deployment/docker`
|
||||
|
|
|
|||
|
|
@ -1,205 +0,0 @@
|
|||
How to deploy Sylius to SymfonyCloud?
|
||||
=====================================
|
||||
|
||||
.. tip::
|
||||
|
||||
Start with reading `SymfonyCloud documentation <https://symfony.com/cloud/doc>`_.
|
||||
|
||||
The process of deploying Sylius to SymfonyCloud is eased by the tools provided by SymfonyCloud for Symfony projects.
|
||||
In this guide you will find sufficient instructions to have your application up and running on SymfonyCloud.
|
||||
|
||||
1. Create a new Sylius application
|
||||
----------------------------------
|
||||
|
||||
This whole section can be skipped if you already have a working project.
|
||||
|
||||
To begin creating your new project, run this command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ composer create-project sylius/sylius-standard acme
|
||||
|
||||
This will create a new Symfony project in the ``acme`` directory. Next, move to the project directory, initialize the
|
||||
git repository and create your first commit:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cd acme
|
||||
$ git init
|
||||
$ git add .
|
||||
$ git commit -m "Initial commit"
|
||||
|
||||
2. Install the SymfonyCloud client
|
||||
----------------------------------
|
||||
|
||||
* Download the CLI tool from `symfony.com <https://symfony.com/download/>`_
|
||||
|
||||
* Login using ``symfony login``
|
||||
|
||||
3. Make the store ready to deploy
|
||||
---------------------------------
|
||||
|
||||
* Initialize a default configuration for SymfonyCloud:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ symfony project:init
|
||||
|
||||
* Customize the ``.symfony/services.yaml`` file:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
db:
|
||||
type: mysql:10.2
|
||||
disk: 1024
|
||||
|
||||
* Customize the ``.symfony.cloud.yaml`` file:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
name: app
|
||||
type: php:7.3
|
||||
build:
|
||||
flavor: none
|
||||
|
||||
runtime:
|
||||
extensions: []
|
||||
|
||||
|
||||
relationships:
|
||||
database: "db:mysql"
|
||||
|
||||
web:
|
||||
locations:
|
||||
"/":
|
||||
root: "public"
|
||||
expires: -1
|
||||
passthru: "/index.php"
|
||||
"/assets/shop":
|
||||
expires: 2w
|
||||
passthru: false
|
||||
allow: false
|
||||
rules:
|
||||
# Only allow static files from the assets directories.
|
||||
'\.(css|js|jpe?g|png|gif|svgz?|ico|bmp|tiff?|wbmp|ico|jng|bmp|html|pdf|otf|woff2|woff|eot|ttf|jar|swf|ogx|avi|wmv|asf|asx|mng|flv|webm|mov|ogv|mpe|mpe?g|mp4|3gpp|weba|ra|m4a|mp3|mp2|mpe?ga|midi?)$':
|
||||
allow: true
|
||||
"/media/image":
|
||||
expires: 2w
|
||||
passthru: false
|
||||
allow: false
|
||||
rules:
|
||||
# Only allow static files from the assets directories.
|
||||
'\.(jpe?g|png|gif|svgz?)$':
|
||||
allow: true
|
||||
"/media/cache":
|
||||
expires: 2w
|
||||
passthru: false
|
||||
allow: false
|
||||
rules:
|
||||
# Only allow static files from the assets directories.
|
||||
'\.(jpe?g|png|gif|svgz?)$':
|
||||
allow: true
|
||||
"/media/cache/resolve":
|
||||
passthru: "/index.php"
|
||||
scripts: false
|
||||
expires: -1
|
||||
allow: true
|
||||
|
||||
disk: 1024
|
||||
|
||||
mounts:
|
||||
"/var": { source: local, source_path: var }
|
||||
"/public/uploads": { source: local, source_path: uploads }
|
||||
"/public/media": { source: local, source_path: media }
|
||||
|
||||
hooks:
|
||||
build: |
|
||||
set -x -e
|
||||
|
||||
curl -s https://get.symfony.com/cloud/configurator | (>&2 bash)
|
||||
(>&2 symfony-build)
|
||||
(>&2 symfony console sylius:install:check-requirements)
|
||||
(>&2
|
||||
# Setup everything to use the Node installation
|
||||
unset NPM_CONFIG_PREFIX
|
||||
export NVM_DIR=${SYMFONY_APP_DIR}/.nvm
|
||||
set +x && . "${NVM_DIR}/nvm.sh" use --lts && set -x
|
||||
# Starting from here, everything is setup to use the same Node
|
||||
yarn build:prod
|
||||
)
|
||||
|
||||
deploy: |
|
||||
set -x -e
|
||||
|
||||
mkdir -p public/media/image var/log
|
||||
(>&2 symfony-deploy)
|
||||
|
||||
4. Commit the configuration
|
||||
---------------------------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git add php.ini .symfony .symfony.cloud.yaml && git commit -m "SymfonyCloud configuration"
|
||||
|
||||
5. Deploy the store to SymfonyCloud
|
||||
-----------------------------------
|
||||
|
||||
The first deploy will take care of creating a new SymfonyCloud project for you.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ symfony deploy
|
||||
|
||||
The output of this command shows you on which URL your online store can be accessed. Alternatively, you can also use
|
||||
``symfony open:remote`` to open your store in your browser.
|
||||
|
||||
.. hint::
|
||||
|
||||
**SymfonyCloud** offers a 7 days trial, which you can use for testing your store deployment.
|
||||
|
||||
6. Finish Sylius installation
|
||||
-----------------------------
|
||||
|
||||
Finish the Sylius installation by running:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ symfony ssh bin/console sylius:install
|
||||
|
||||
.. tip::
|
||||
|
||||
You can load the predefined set of Sylius fixtures to try your new store:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ symfony ssh bin/console sylius:fixtures:load
|
||||
|
||||
7. Dive deeper
|
||||
--------------
|
||||
|
||||
Add default Sylius cronjobs:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Add the example below to your ``.symfony.cloud.yaml`` file. This runs these cronjobs every 6 hours.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
crons:
|
||||
cleanup_cart:
|
||||
spec: '0 */6 * * *'
|
||||
cmd: croncape /usr/bin/flock -n /tmp/lock.app.cleanup_cart symfony console sylius:remove-expired-carts --verbose
|
||||
cleanup_order:
|
||||
spec: '0 */6 * * *'
|
||||
cmd: croncape /usr/bin/flock -n /tmp/lock.app.cleanup_order symfony console sylius:cancel-unpaid-orders --verbose
|
||||
|
||||
Additional tips:
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
* SymfonyCloud can serve gzipped versions of your static assets. Make sure to save your assets in the same folder, but with a .gz suffix.
|
||||
|
||||
Learn more
|
||||
----------
|
||||
|
||||
* SymfonyCloud documentation: `Getting started <https://symfony.com/doc/master/cloud/getting-started.html>`_
|
||||
* SymfonyCloud documentation: `Moving to production <https://symfony.com/doc/master/cloud/cookbooks/go_live.html>`_
|
||||
* :doc:`Installation Guide </book/installation/installation>`
|
||||
|
|
@ -141,11 +141,8 @@ Deployment
|
|||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
deployment/symfonycloud
|
||||
deployment/platform-sh
|
||||
deployment/cloudways
|
||||
deployment/cron-jobs
|
||||
deployment/artifakt
|
||||
deployment/docker
|
||||
|
||||
.. include:: /cookbook/deployment/map.rst.inc
|
||||
|
|
|
|||
|
|
@ -10,16 +10,10 @@ Check out our deployment cookbooks:
|
|||
.. tip::
|
||||
|
||||
- 👉 :doc:`How to deploy Sylius to Platform.sh? </cookbook/deployment/platform-sh>`
|
||||
- 👉 :doc:`How to deploy Sylius to Symfony Cloud? </cookbook/deployment/symfonycloud>`
|
||||
- 👉 :doc:`How to deploy Sylius to Artifakt? </cookbook/deployment/artifakt>`
|
||||
- 👉 :doc:`How to deploy Sylius to Cloudways? </cookbook/deployment/cloudways>`
|
||||
- 🐳 :doc:`How to deploy Sylius with Docker </cookbook/deployment/docker>`
|
||||
|
||||
Learn more about the deployment platforms
|
||||
-----------------------------------------
|
||||
|
||||
* `Platform.sh <https://docs.platform.sh>`_
|
||||
* `Symfony Cloud <https://symfony.com/cloud/>`_
|
||||
* `Artifakt.com <https://docs.artifakt.com/>`_
|
||||
* `Cloudways PHP Hosting <https://support.cloudways.com/en/>`_
|
||||
* `Docker <https://docker.com/>`_
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue