Skip to content

Commit

Permalink
Update Deployer guide (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
ameotoko authored Dec 1, 2022
1 parent ceb954d commit 64719b9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
20 changes: 11 additions & 9 deletions docs/manual/guides/deployer.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ Diese Anleitung bezieht sich auf die Deployer-Version >=7.0 und Contao-Version >

Zuerst musst du Deployer installieren: [https://deployer.org/docs/][1]

Du kannst Deployer entweder global oder per Projekt (mit Composer) installieren. Der Kommandozeilenbefehl lautet
entsprechend `dep` oder `./vendor/bin/dep`.
```bash
composer require --dev deployer/deployer
```

Bevor du weitermachst, stelle sicher, dass du mindestens Version _7.0.0-rc.5_ installiert hast (`dep --version`).
Bevor du weitermachst, stelle sicher, dass du mindestens Version _7.0_ installiert hast (`vendor/bin/dep --version`).

Jetzt kannst du deine `deploy.php`-Datei in dem Projekt erstellen:

Expand Down Expand Up @@ -108,13 +109,14 @@ für die Konfiguration findest du hier: [nutshell-framework/deployer-recipes][4]

## Webserver einrichten

Wie du aus der [Contao-Doku][5] weißt, musst du den Document-Root auf `/public` (bzw. `/web`) einstellen. Die Idee
hinter Deployer ist, dass es keine Downtime bei Updates gibt. Deswegen werden rollierende Symlinks eingesetzt. Den
Wie du aus der [Contao-Doku][5] weißt, musst du den Document-Root auf `/public` (bzw. `/web`) einstellen. Die Idee hinter
Deployer ist, dass es eine möglichst kurze Downtime bei Updates gibt. Deswegen werden rollierende Symlinks eingesetzt. Den
Document-Root von deinem vHost musst du entsprechend auf `/current/public` (bzw. `/current/web`) einstellen. Ein
komplettes Beispiel für einen Document-Root wäre: `/var/www/foobar/html/example.org/current/public`.

Contao migriert langsam zum `/public`-Ordner als Web-Root. Wenn du in Contao 4.13 noch den `/web`-Ordner verwendest,
dann definiere diesen entsprechend, damit Deployer das auch weiß.
{{% notice "info" %}}
Contao verwendet standardmäßig den `/public`-Ordner als Web-Root. Wenn deine Contao-Installation noch den alten `/web`-Ordner
verwendet, dann definiere diesen entsprechend in `composer.json`, damit Deployer das auch weiß.

```json
{
Expand All @@ -123,7 +125,7 @@ dann definiere diesen entsprechend, damit Deployer das auch weiß.
}
}
```

{{% /notice %}}

## Projektspezifische Tasks

Expand All @@ -147,7 +149,7 @@ before('deploy', 'encore:compile');

## Und nun: Deployen!

Nachdem wir alles konfiguriert haben, können wir jetzt `dep deploy` ausführen und das Projekt auf den Webserver
Nachdem wir alles konfiguriert haben, können wir jetzt `vendor/bin/dep deploy` ausführen und das Projekt auf den Webserver
deployen.


Expand Down
22 changes: 13 additions & 9 deletions docs/manual/guides/deployer.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ The Deployer recipe is part of Deployer 7 and is intended to work for Contao 4.1

## Install Deployer

If not done yet, install Deployer as described here: [https://deployer.org/docs/][1]
If not done yet, install Deployer in your project as described [in the docs:][1]

You can either install Deployer globally or per project and use the command `dep` or `./vendor/bin/dep` respectively.
```bash
composer require --dev deployer/deployer
```

Verify that you are running Deployer in the minimum version _7.0.0-rc.5_ by running `dep --version`.
Verify that you are running Deployer in the minimum version _7.0_ by running `vendor/bin/dep --version`.

Once done, you can create a `deploy.php` file in your project:

Expand Down Expand Up @@ -102,13 +104,14 @@ task. The `rsync` task implies an _exclude strategy_ rather than an _include str
## Provision web server

As you know [from the Contao documentation][5], you have to set the document root of the server to `/public` (or
`/web` in older versions) of the project. The idea of Deployer is to provide updates without downtime, and to realize
this, Deployer utilizes rolling symlink releases. Consequently, you have to set the document root of your vHost to
`/current/public` (or `/current/web` respectively). A full example for the document root might look like
`/web` in older versions) of the project. The idea of Deployer is to provide updates with the shortest possible downtime,
and to realize this, Deployer utilizes rolling symlink releases. Consequently, you have to set the document root of your
vHost to`/current/public` (or `/current/web` respectively). A full example for the document root might look like
`/var/www/foobar/html/example.org/current/public`.

Contao is slowly migrating to use the `/public` folder of the project as the document root. When your Contao 4.13
installation is still using the folder `/web` as public directory, please explicitly set it in the `composer.json`
{{% notice "info" %}}
By default, Contao uses the `/public` folder of the project as the document root. If your Contao
installation is still using the legacy `/web` folder as public directory, please explicitly set it in the `composer.json`
of the project:

```json
Expand All @@ -118,6 +121,7 @@ of the project:
}
}
```
{{% /notice %}}

## Add build-task to deployment

Expand All @@ -141,7 +145,7 @@ before('deploy', 'encore:compile');

## Finally: Deploy

You are now all set to run `dep deploy`.
You are now all set to run `vendor/bin/dep deploy`.

## Tips

Expand Down

0 comments on commit 64719b9

Please sign in to comment.