[docker][docs]Deploy Sylius with Docker

This commit is contained in:
Ferror 2022-06-02 13:10:35 +02:00
parent d058f34449
commit 29adb10f1b
8 changed files with 79 additions and 3 deletions

View file

@ -8,6 +8,7 @@ The process of installing Sylius together with the requirements to run it effici
requirements
installation
installation_with_docker
sylius_plus_installation
upgrading
sylius_plus_upgrading

View file

@ -0,0 +1,33 @@
.. index::
single: Installation
Installation with Docker
========================
Docker
------
Docker is an open-sourced platform for developing, delivering, and running applications. Docker allows you to separate your
application from your infrastructure, simplifies software delivery. Docker allows you to manage infrastructure in the
same way that applications are managed. Implementing the platform methodology, enables fast code delivery,
testing, and implementation. Docker significantly reduces the delay between writing the code and running it in the production environment.
.. note::
Make sure you have `Docker <https://docs.docker.com/get-docker/>`_ installed on your local machine.
Development
-----------
Sylius Standard comes with the `multi-stage build <https://docs.docker.com/develop/develop-images/multistage-build/>`_.
You can execute it via the ``docker compose up -d`` command in your favorite terminal. Please note that the speed of building images
and initializing containers depends on your local machine and internet connection - it may take some time. Then enter ``localhost`` in your browser or execute ``open localhost`` in your terminal.
.. code-block:: bash
docker compose up -d
open localhost
.. tip::
:doc:`Learn how to deploy Sylius-Standard production ready Docker Compose configuration </cookbook/deployment/docker>`

View file

@ -1,5 +1,6 @@
* :doc:`/book/installation/requirements`
* :doc:`/book/installation/installation`
* :doc:`/book/installation/installation_with_docker`
* :doc:`/book/installation/sylius_plus_installation`
* :doc:`/book/installation/upgrading`
* :doc:`/book/installation/sylius_plus_upgrading`

View file

@ -0,0 +1,33 @@
How to deploy Sylius with Docker?
=================================
The simplest way to deploy your Sylius store with Docker is to use the template provided in the Sylius-Standard ``docker-compose.prod.yml`` configuration file.
.. tip::
When using a Virtual Private Server (VPS) we recommend having at least 2GB of RAM memory.
1. Install Docker on your VPS
-----------------------------
.. code-block:: bash
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
2. Execute Docker Compose Configuration
---------------------------------------
.. code-block:: bash
export MYSQL_PASSWORD=SLyPJLaye7
docker compose -f docker-compose.prod.yml up -d
.. tip::
Deploying the database on the same machine as the application is not the best practice. **Use Managed Database solution instead.**
Learn more
----------
* `Check out Docker learning recommendations! <https://docs.docker.com/get-started/resources/#self-paced-online-learning>`_

View file

@ -3,3 +3,4 @@
* :doc:`/cookbook/deployment/cron-jobs`
* :doc:`/cookbook/deployment/symfonycloud`
* :doc:`/cookbook/deployment/artifakt`
* :doc:`/cookbook/deployment/docker`

View file

@ -123,6 +123,7 @@ Deployment
deployment/cloudways
deployment/cron-jobs
deployment/artifakt
deployment/docker
.. include:: /cookbook/deployment/map.rst.inc

View file

@ -3,9 +3,9 @@ Deployment
Development usually takes most of the time in project implementation, but we should not forget about what's at the end of this process -
application deployment into the server. We believe, that it should be as easy and understandable as possible.
There are many servers which you can choose for your store deployment: in our documentation you will find an easy Platform.sh guide.
Check it out!
Check out our deployment cookbooks:
.. tip::
@ -13,6 +13,7 @@ Check it out!
- 👉 :doc:`How to deploy Sylius to Symfony Cloud? </cookbook/deployment/cloudways>`
- 👉 :doc:`How to deploy Sylius to Artifakt? </cookbook/deployment/symfonycloud>`
- 👉 :doc:`How to deploy Sylius to Cloudways? </cookbook/deployment/artifakt>`
- 🐳 :doc:`How to deploy Sylius with Docker </cookbook/deployment/docker>`
Learn more about the deployment platforms
-----------------------------------------
@ -21,3 +22,4 @@ Learn more about the deployment platforms
* `Symfony Cloud <https://symfony.com/cloud/>`_
* `Artifakt.com <https://docs.artifakt.com/>`_
* `Cloudways PHP Hosting <https://support.cloudways.com/en/>`_
* `Docker <https://docker.com/>`_

View file

@ -2,7 +2,7 @@ Installation
============
So you want to try creating an online shop with Sylius? Great! The first step is the most important one, so let's start
with the Sylius project installation via Composer. We will be using the latest stable version of Sylius - ``1.7``.
with the Sylius project installation via Composer. We will be using the latest stable version of Sylius - ``1.11``.
Before installation
-------------------
@ -28,6 +28,10 @@ The easiest way to install Sylius on your local machine is to use the following
It will create a ``MyFirstShop`` directory with a brand new Sylius application inside.
.. note::
Are you familiar with Docker? Check out the :doc:`Sylius Installation Guide with Docker </book/installation/installation_with_docker>`
.. warning::
Beware! The next step includes the database setup. It will set your database credentials