Update Drupal docs (#1619)

This commit is contained in:
wglambert 2019-12-12 14:37:53 -08:00 committed by Tianon Gravi
parent 2c9432c26a
commit a4af086124
1 changed files with 22 additions and 6 deletions

View File

@ -28,23 +28,39 @@ When first accessing the webserver provided by this image, it will go through a
## MySQL
For using Drupal with a MySQL database you'll want to run a [MySQL](https://hub.docker.com/_/mysql/) container and configure it using environment variables for `MYSQL_DATABASE`, `MYSQL_USER`, `MYSQL_PASSWORD`, and `MYSQL_ROOT_PASSWORD`
```console
$ docker run --name some-%%REPO%% --network some-network -d %%IMAGE%%
$ docker run -d --name some-mysql --network some-network \
-e MYSQL_DATABASE=drupal \
-e MYSQL_USER=user \
-e MYSQL_PASSWORD=password \
-e MYSQL_ROOT_PASSWORD=password \
mysql:5.7
```
- Database type: `MySQL, MariaDB, or equivalent`
In Drupal's "set up database" step on the web installation walkthrough enter the values for the environment variables you provided
- Database name/username/password: `<details for accessing your MySQL instance>` (`MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_DATABASE`; see environment variables in the description for [`mysql`](https://hub.docker.com/_/mysql/))
- ADVANCED OPTIONS; Database host: `some-mysql` (for using the DNS entry added by `--network` to access the MySQL container)
- ADVANCED OPTIONS; Database host: `some-mysql` (Containers on the same [docker-network](https://docs.docker.com/v17.09/engine/userguide/networking/) are routable by their container-name)
## PostgreSQL
For using Drupal with a PostgreSQL database you'll want to run a [Postgres](https://hub.docker.com/_/postgres) container and configure it using environment variables for `POSTGRES_DB`, `POSTGRES_USER`, and `POSTGRES_PASSWORD`
```console
$ docker run --name some-%%REPO%% --network some-network -d %%IMAGE%%
$ docker run -d --name some-postgres --network some-network \
-e POSTGRES_DB=drupal \
-e POSTGRES_USER=user \
-e POSTGRES_PASSWORD=pass \
postgres:11
```
In Drupal's "set up database" step on the web installation walkthrough enter the values for the environment variables you provided
- Database type: `PostgreSQL`
- Database name/username/password: `<details for accessing your PostgreSQL instance>` (`POSTGRES_USER`, `POSTGRES_PASSWORD`; see environment variables in the description for [`postgres`](https://hub.docker.com/_/postgres/))
- ADVANCED OPTIONS; Database host: `some-postgres` (for using the DNS entry added by `--network` to access the PostgreSQL container)
- Database name/username/password: `<details for accessing your PostgreSQL instance>` (`POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB`; see environment variables in the description for [`postgres`](https://hub.docker.com/_/postgres/))
- ADVANCED OPTIONS; Database host: `some-postgres` (Containers on the same [docker-network](https://docs.docker.com/v17.09/engine/userguide/networking/) are routable by their container-name)
## Volumes