Skip to content

Commit 56a04d0

Browse files
authored
[TASK] Update deployement Infos for Beginners (#516)
Releases: main, 13.4, 12.4
1 parent 704a557 commit 56a04d0

File tree

1 file changed

+58
-19
lines changed

1 file changed

+58
-19
lines changed
Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,77 @@
11
.. include:: /Includes.rst.txt
2-
32
.. index:: deployment, composer, production setup
43

54
.. _deploytypo3:
5+
.. _deployment:
66

77
===============
88
Deploying TYPO3
99
===============
1010

11-
This guide outlines the steps required to manually deploy TYPO3 and ensure the installation
12-
is secure and ready to be used in a production context. This guide also highlights a number of
13-
automation tools that can help automate the deployment process.
11+
.. _deployment-git-composer:
12+
13+
Using Git and Composer on the webserver
14+
=======================================
15+
16+
* Check if Composer is available on the production server. If it is not
17+
available consider to use the
18+
`latest composer.phar <https://getcomposer.org/download/>`__.
19+
* Keep all development related files in a Git repository.
20+
* Clone this repository on your production server.
21+
* Copy the database to the production server.
22+
* Install TYPO3 without dev dependencies on the production server:
23+
24+
.. code-block::
25+
26+
composer install --no-dev
27+
28+
* Compare the database
29+
* Fix file permissions
30+
* Clear caches
31+
32+
.. todo: Link these steps once documented
1433
15-
There are several different ways to deploy TYPO3. One of the more simple
16-
options is to manually copy its files and database
17-
from a local machine to the live server, adjusting the configuration where
18-
necessary.
34+
If you do a `composer install` directly on the production server you might
35+
experience some problems. For this reason some developers and administrators
36+
decide not to do it:
1937

20-
General Deployment Steps
21-
========================
38+
* There can be several minutes of downtime even if the installation goes
39+
smoothly.
40+
* The installation might fail if some packages are not available.
41+
* You might accidentally call `composer update` as is often done during
42+
development and do unintended, untested updates.
43+
* You might omit the `--no-dev` option and accidentally install packages
44+
that are not save to be used during production.
45+
46+
Some of these problems can be fixed by using a symlink strategy where one
47+
directory is running on production and another one is being updated.
48+
49+
.. _deployment-copy-files:
50+
51+
Build locally and copy all files and symlinks to the server
52+
===========================================================
2253

2354
* Build the local environment (installing everything necessary for the website)
2455
* Run :bash:`composer install --no-dev` to install without development dependencies
2556
* Copy files to the production server
2657
* Copy the database to the production server
27-
* Clearing the caches
58+
* Compare the database
59+
* Fix file permissions
60+
* Clear caches
61+
62+
.. todo: Link these steps once documented
63+
64+
There can be several problems with this strategy:
65+
66+
* Copying files or unzipping files can be slow, there can be several minutes
67+
of downtime.
68+
* A TYPO3 installation depends on symlinks. Make sure these symlinks are
69+
preserved during copying and or compressing files.
2870

29-
.. note::
71+
.. _deployment-automatic:
3072

31-
The :bash:`composer install` command should not be run on the live environment.
32-
Ideally, Composer should only run locally or on a dedicated deployment machine,
33-
to allow testing before going live.
73+
Automatic deployment
74+
====================
3475

35-
To avoid conflicts between the local and the server's PHP version,
36-
the server's PHP version can be defined in the :file:`composer.json` file
37-
(e.g. ``{"platform": {"php": "8.2"}}``), so Composer will always check
38-
the correct dependencies.
76+
There are multiple tools that can be used to automate deployment. Read more
77+
about it: :ref:`TYPO3 Explained, automatic deployment <t3coreapi:deployment-automatic>`.

0 commit comments

Comments
 (0)