You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: environments/customizing.md
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,8 @@ To configure your project with a non-default PHP version, add the following to t
6
6
7
7
PHP_VERSION=7.2
8
8
9
-
The versions of MariaDB, Elasticsearch, Varnish, Redis, NodeJS and Composer may also be similarly configured using variables in the `.env` file:
9
+
The versions of Elasticsearch, Varnish, Redis, NodeJS and Composer may also be similarly configured using variables in the `.env` file:
10
10
11
-
*`MARIADB_VERSION`
12
11
*`ELASTICSEARCH_VERSION`
13
12
*`REDIS_VERSION`
14
13
*`VALKEY_VERSION`
@@ -17,6 +16,33 @@ The versions of MariaDB, Elasticsearch, Varnish, Redis, NodeJS and Composer may
17
16
*`NODE_VERSION`
18
17
*`COMPOSER_VERSION`
19
18
19
+
## Database
20
+
21
+
Warden supports both **MariaDB** (default) and **MySQL** as the database engine. The distribution and version are controlled via two environment variables in your project's `.env` file:
22
+
23
+
*`MYSQL_DISTRIBUTION` — set to `mariadb` (default) or `mysql`
24
+
*`MYSQL_DISTRIBUTION_VERSION` — the image tag/version to use
25
+
26
+
For example, to use MariaDB 11.4:
27
+
28
+
MYSQL_DISTRIBUTION=mariadb
29
+
MYSQL_DISTRIBUTION_VERSION=11.4
30
+
31
+
To use MySQL 8.4 instead:
32
+
33
+
MYSQL_DISTRIBUTION=mysql
34
+
MYSQL_DISTRIBUTION_VERSION=8.4
35
+
36
+
:::{note}
37
+
Drupal and CakePHP environments use `DB_DISTRIBUTION` and `DB_DISTRIBUTION_VERSION` instead of the `MYSQL_` prefix. The values and behavior are the same.
38
+
:::
39
+
40
+
After changing the database distribution or version, run `warden env up` to re-create the database container.
41
+
42
+
:::{warning}
43
+
Switching distributions (e.g. from MariaDB to MySQL) is **not** a drop-in replacement for existing data volumes. If you change the distribution on an existing environment, you should export your database first, remove the db volume (`warden env down -v`), and re-import after the new container is running.
44
+
:::
45
+
20
46
Start of some environments could be skipped by using variables in `.env` file:
0 commit comments