Skip to content
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

Add new section on how to update locally #578

Merged
merged 14 commits into from Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 110 additions & 0 deletions docs/manual/installation/update-contao.de.md
Expand Up @@ -143,3 +143,113 @@ $ vendor/bin/contao-console contao:migrate
verwenden.

Deine Contao-Installation ist jetzt auf dem neuesten Stand.


### Lokale Aktualisierung ohne die Composer Resolver Cloud

Die Vorgehensweisen, die oben in ["Aktualisierung über die Kommandozeile"](#aktualisierung-ueber-die-kommandozeile)
fiedsch marked this conversation as resolved.
Show resolved Hide resolved
und ["Aktualisierung mit dem Contao Manager"](#aktualisierung-mit-dem-contao-manager) beschrieben wurden, kannst du
fiedsch marked this conversation as resolved.
Show resolved Hide resolved
auch lokal durchführen. Dies hat den Vorteil, dass du im Gegensatz zur Umgebung bei einem Hoster keine Probleme mit
nicht erfüllten Systemanforderungen wie z.B. ungenügendem Arbeitsspeicher bekommst, denn du kannst die entsprechende
fiedsch marked this conversation as resolved.
Show resolved Hide resolved
Konfiguration selbst nach Bedarf anpassen.



#### Voraussetzungen bei Verwendung der Kommandozeile

Was benötigst du auf deinem Computer?

- ein beliebiges Verzeichnis, in dem du arbeitest (dein Arbeitsverzeichnis)
- PHP, idealerweise in der gleichen Version, wie sie auf deinem Hosting verwendet wird.
- Composer (wir gehen hier davon aus, dass du Composer in deinem Arbeitsverzeichnis installierst)
- Kopien der `composer.json` und `composer.lock` der Contao-Installation bei deinem Hoster

Was benötigst du _nicht_?

- MySQL
- Eine lokale Contao-Installation


#### Die Aktualisierung durchführen

Kopiere die `composer.json` und `composer.lock` von deinem Hosting in dein Arbeitsverzeichnis.
Im Wesentlichen machst du dann das Gleiche, wie oben unter
["Aktualisierung über die Kommandozeile"](#aktualisierung-ueber-die-kommandozeile) beschrieben:
fiedsch marked this conversation as resolved.
Show resolved Hide resolved

Öffne ein Terminal und wechsle in das Arbeitsverzeichnis. Führe dort

```bash
php composer.phar update
```

aus. Nach dem erfolgreichen Abschluss der Aktualisierung kopierst du die aktualisierte `composer.lock`
(und die `composer.json`, falls du dort Änderungen gemacht hast) zurück in die Contao-Installation
auf deinem Hosting.

Danach meldest du dich entweder per `ssh` auf deinem Server (Hosting) an

```bash
ssh benutzername@example.com
```

und lässt Composer die aktualisierten Pakete installieren

```bash
php composer.phar install
```

oder du verwendest den Contao Manager. Dort wählst du unter Systemwartung den Punkt Composer-Abhängigkeiten, Installer
fiedsch marked this conversation as resolved.
Show resolved Hide resolved
ausführen.
fiedsch marked this conversation as resolved.
Show resolved Hide resolved

![Paketinstallation mit dem Contao-Manager](/de/installation/images/de/composer-install-mit-dem-contao-manager.png?classes=shadow)

Zum Abschluss musst du noch die Datenbanktabellen aktualisieren.


#### Datenbanktabellen aktualisieren

Öffne das [Contao-Installtool](../contao-installtool/) und überprüfe, ob nach der Aktualisierung Änderungen an deiner
Datenbank notwendig sind. Führe gegebenenfalls die vorgeschlagenen Änderungen durch und schließe dann das Installtool.

Anstelle des Contao-Installtools kannst du (ab Contao 4.9) zur Aktualisierung der Datenbanktabellen auf der
Kommandozeile das Command
```bash
$ vendor/bin/contao-console contao:migrate
```
verwenden.

Deine Contao-Installation ist jetzt auf dem neuesten Stand.


#### Verschiedene PHP-Versionen

Wenn die lokal verwendete PHP-Version eine andere ist, als bei deinem Hosting, musst du in der `composer.json`
angeben, welche PHP-Version verwendet werden soll:

```json
...
"config": {
"platform": {
"php": "7.4.99"
}
},
"require": {
...
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@netzarbeiter I do not get, what that change is supposed to correct.

The suggested change removes the closing ``` and inroduces a }. Do you want to add the } as the closing brace of "require": { block? The backticks to close the code block would still be required though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to get rid of that.

github

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the unclosed } of the pseudo json code caused the error


#### Lokale Updates mit dem Contao Manager

Du benötigst eine lokale Contao-Installation. In dieser installierst du den Contao Manager und führst das Update wie
im Abschnitt ["Aktualisierung mit dem Contao Manager"](#aktualisierung-mit-dem-contao-manager) beschrieben durch.
fiedsch marked this conversation as resolved.
Show resolved Hide resolved

Stelle zuvor jedoch sicher, daß die Composer Resolver Cloud nicht verwendet wird. Du benötigst sie nicht, da du auf
deinem eigenen Server genügend Arbeitsspeicher bereitstellen kannst und entlastest so die Cloud.

Die Einstellung findest du in der Systemprüfung im Bereich Serverkonfiguration.
fiedsch marked this conversation as resolved.
Show resolved Hide resolved

![Deaktivierung der Composer Resolver Cloud](/de/installation/images/de/cloud_resolver_abschalten.png?classes=shadow)

Nach dem erfolgreichen Update überträgst du wie im vorherigen Abschnitt beschrieben die `composer.json` und
`composer.lock` zurück in die Contao-Installation auf deinem Hosting. Die weiteren Schritte auf deinem Hosting sind die
gleichen wie oben beschrieben.