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

Update ddev documentation #1356

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2e7d50a
[Task] Update ddev documentation
Mar 3, 2024
2662547
[Task] add timezone to config parameter
Jul 23, 2024
7266e7e
[Task] update MAILER_DSN for Mailpit
Jul 23, 2024
2dab368
[Task] update en translation
Jul 23, 2024
cb022b1
[Task] remove setup examples
Jul 23, 2024
ee45137
Update docs/manual/guides/local-installation/ddev.de.md
avhulst Jul 24, 2024
8c06576
Update docs/manual/guides/local-installation/ddev.en.md
avhulst Jul 24, 2024
6eca166
Update docs/manual/guides/local-installation/ddev.en.md
avhulst Jul 24, 2024
f4169e6
[Task] Fix typo
Jul 24, 2024
1850400
[Task] add Custom PHP Configuration
Jul 24, 2024
391278a
Update docs/manual/guides/local-installation/ddev.de.md
avhulst Jul 25, 2024
3e7d78f
Update docs/manual/guides/local-installation/ddev.en.md
avhulst Jul 25, 2024
c9862d0
Update docs/manual/guides/local-installation/ddev.en.md
avhulst Jul 25, 2024
20aa470
Update docs/manual/guides/local-installation/ddev.de.md
avhulst Jul 25, 2024
ec6d8de
Update docs/manual/guides/local-installation/ddev.de.md
avhulst Jul 25, 2024
751a94e
Update docs/manual/guides/local-installation/ddev.de.md
avhulst Jul 25, 2024
f1bb15e
Update docs/manual/guides/local-installation/ddev.de.md
avhulst Jul 25, 2024
0ba1b02
Update docs/manual/guides/local-installation/ddev.en.md
avhulst Jul 25, 2024
5652271
Update docs/manual/guides/local-installation/ddev.en.md
avhulst Jul 25, 2024
28c8799
Update docs/manual/guides/local-installation/ddev.de.md
avhulst Jul 25, 2024
15b5d99
Merge branch 'main' into feature/ddev-local-installation-update
avhulst Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 35 additions & 42 deletions docs/manual/guides/local-installation/ddev.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,42 +80,58 @@ mkdir -p ~/Projekte/contao/contao-ddev && cd ~/Projekte/contao/contao-ddev
DDEV-Konfiguration anlegen mit:

```shell
ddev config
ddev config --project-type=php --docroot=public --webserver-type=apache-fpm --php-version=8.2 --create-docroot
avhulst marked this conversation as resolved.
Show resolved Hide resolved
```

DDEV-Einstellungen vornehmen, als __Project Type__ auf jeden fall `php` auswählen. Die __Docroot Location__ erstmal leer lassen, da es bei Neuinstallationen noch keinen `public` Ordner gibt und DDEV dann nicht starten kann.
Contao 5.3 installieren:

```shell
ddev start
ddev composer create contao/managed-edition:5.3
```

Zur Installation via Konsole ist es am einfachsten, sich via SSH mit dem Container zu verbinden.
Nach der Installation müssen die Datenbankzugangsdaten in die `.env` eingetragen werden. In diesem Zug richten wir auch direkt Mailpit ein.
avhulst marked this conversation as resolved.
Show resolved Hide resolved

```shell
ddev ssh
```env
APP_ENV=prod
DATABASE_URL="mysql://db:db@db:3306/db"
MAILER_DSN="smtp://localhost:1025?encryption=&auth_mode="
avhulst marked this conversation as resolved.
Show resolved Hide resolved
```

Im Anschluss die Datenbank anlegen:

```shell
composer create-project contao/managed-edition contao 4.13
ddev exec "bin/console contao:migrate"
```

In der `.ddev/config.yml` nun das Docroot anpassen und ddev neu starten.
Backend-User anlegen:

```yml
docroot: "contao/public"
```shell
ddev exec "bin/console contao:user:create"
```

Um Apache anstatt NGINX zu verwenden, den Eintrag `webserver_type: nginx-fpm` in `apache-fpm` ändern.
Projekt im Browser aufrufen:

```yml
webserver_type: apache-fpm
```shell
ddev launch
```

Die `ddev` Binary steht im Container nicht zur Verfügung, also erst mit `exit` auf die Host-Konsole wechseln.
{{% notice note %}}

```shell
ddev restart
```
Mit `ddev launch contao` kommst du direkt zur Administration.

{{% /notice %}}

## Zusatz Informationen

`ddev start` startet das Projekt, `ddev stop` beendet es. Stelle vorher sicher, dass du in den Projektordner gewechselt hast.

`ddev poweroff` kann aus jedem Verzeichnis heraus alle gestarteten Projekte/Container stoppen.

Mit `ddev ssh` wechselst du in die Shell des Containers und kannst auf der Konsole arbeiten. Die `ddev` Binary steht im Container nicht zur Verfügung, also erst mit `exit` auf die Host-Konsole wechseln.

`ddev describe` gibt eine Übersicht der Services, die im Projekt zur Verfügung stehen und wie du sie erreichst.

`ddev xdebug on` startet Xdedug. [Informationen zum IDE-Setup](https://ddev.readthedocs.io/en/latest/users/debugging-profiling/step-debugging/#ide-setup)

Eine Datenbank gibt es schon in DDEV. Die Verbindungsdaten für die Installation lauten:
avhulst marked this conversation as resolved.
Show resolved Hide resolved

Expand All @@ -126,22 +142,9 @@ Eine Datenbank gibt es schon in DDEV. Die Verbindungsdaten für die Installation
| **Passwort** | db |
| **Datenbank** | db |

Auf die Datenbank des aktuellen Projektes kann über das phpMyAdmin Add-On zugegriffen werden. Mit folgenden Befehl öffnet sich nach Eingabe automatisch ein Browser-Tab mit dem Administrationswerkzeug für MySQL-Datenbanken:

```shell
ddev phpmyadmin
```
Seit ddev Version 1.22.0 ist die Unterstützung von phpmyadmin in ein DDEV Add-on umgewandelt worden. Daher muss statt `ddev launch -p` der obige Befehl verwendet werden.

{{% notice note %}}
Mit `ddev describe` erhältst du eine Übersicht über Services, die im Projekt zur Verfügung stehen und wie du sie erreichst. Mit `ddev poweroff` kannst du aus jedem Verzeichnis heraus alle gestarteten Projekte/Container stoppen.

{{% /notice %}}


## DDEV Addons

DDEV bietet nun auch [Services als Addon](https://ddev.readthedocs.io/en/latest/users/extend/additional-services/).
DDEV bietet auch [Services als Addon](https://ddev.readthedocs.io/en/latest/users/extend/additional-services/).


### Beispiel: Adminer
Expand All @@ -150,14 +153,4 @@ DDEV bietet nun auch [Services als Addon](https://ddev.readthedocs.io/en/latest/
ddev get ddev/ddev-adminer && ddev restart
```

Zudem kann man phpMyAdmin in der `.ddev/config.yml` auch deaktivieren:

```yml
omit_containers: [dba]
```

```shell
ddev restart
```


Mit `ddev describe` erfährst du, wie du Adminer erreichst.
64 changes: 35 additions & 29 deletions docs/manual/guides/local-installation/ddev.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,42 +80,60 @@ mkdir -p ~/projects/contao/contao-ddev && cd ~/projects/contao/contao-ddev
Create the DDEV configuration with:

```shell
ddev config
ddev config --project-type=php --docroot=public --webserver-type=apache-fpm --php-version=8.2 --create-docroot
```

Make DDEV settings, select `php` as __Project Type__ in any case. Leave the __Docroot Location__ empty for now, because there is no `public` folder for new installations and DDEV can not start then.
Install Contao 5.3:

```shell
ddev start
ddev composer create contao/managed-edition:5.3
```

For installation via console it is easiest to go via ssh into the container.
After installation, the database access data must be entered in the `.env`. At the same time, we also set up Mailpit directly.

```shell
ddev ssh
```env
APP_ENV=prod
DATABASE_URL="mysql://db:db@db:3306/db"
MAILER_DSN="smtp://localhost:1025?encryption=&auth_mode="
```

Then create the database:

```shell
composer create-project contao/managed-edition contao 4.13
ddev exec "bin/console contao:migrate"
```

In the `.ddev/config.yml` now adjust the docroot and restart ddev.
Create backend user:

```yml
docroot: "contao/public"
```shell
ddev exec "bin/console contao:user:create"
```

To use Apache instead of NGINX, change your entry `webserver_type: nginx-fpm` to `apache-fpm`.
avhulst marked this conversation as resolved.
Show resolved Hide resolved

```yml
webserver_type: apache-fpm
```shell
ddev launch
```

{{% notice note %}}

With `ddev launch contao` you get directly to the administration.

{{% /notice %}}

The `ddev` binary is not available in the container, so first switch to the host console with `exit`.

```shell
ddev restart
```
## Additional information

`ddev start` starts the project, `ddev stop` ends it. Make sure beforehand that you have changed to the project folder.

`ddev poweroff` can stop all started projects/containers from any directory.

With `ddev ssh` you can switch to the shell of the container and work on the console. The `ddev` binary is not available in the container, so first switch to the host console with `exit`.

`ddev describe` gives an overview of the services available in the project and how to access them.

`ddev xdebug on` starts Xdedug. [Information about the IDE setup](https://ddev.readthedocs.io/en/latest/users/debugging-profiling/step-debugging/#ide-setup)

A database already exists in DDEV. The connection data for the installation are:
avhulst marked this conversation as resolved.
Show resolved Hide resolved

Expand All @@ -126,20 +144,6 @@ A database already exists in DDEV. The connection data for the installation are:
| **password** | db |
| **Database** | db |

The database of the current project can be accessed via the phpMyAdmin add-on. Enter the following command to automatically open a browser tab with the administration tool for MySQL databases:

```shell
ddev phpmyadmin
```

Since ddev version 1.22.0 the support of phpmyadmin has been converted into a DDEV add-on. Therefore the above command must be used instead of `ddev launch -p`.

{{% notice note %}}
With `ddev describe` you get an overview of the services available in the project and how to reach them. With `ddev poweroff` you can stop all started projects/containers from any directory.

{{% /notice %}}


## DDEV Addons

DDEV now offers [Services as Addon](https://ddev.readthedocs.io/en/latest/users/extend/additional-services/).
Expand All @@ -150,3 +154,5 @@ DDEV now offers [Services as Addon](https://ddev.readthedocs.io/en/latest/users/
```shell
ddev get ddev/ddev-adminer && ddev restart
```

With `ddev describe` you can find out how to reach Adminer.