diff --git a/docs/docker-images/mariadb.md b/docs/docker-images/mariadb.md index fce82de9fe..ba15b099ca 100644 --- a/docs/docker-images/mariadb.md +++ b/docs/docker-images/mariadb.md @@ -6,7 +6,7 @@ The [Lagoon `MariaDB` image Dockerfile](https://github.com/uselagoon/lagoon-imag This Dockerfile is intended to be used to set up a standalone MariaDB database server. -* 10.4 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb/10.4.Dockerfile) (Alpine 3.12 Support until May 2022) - `uselagoon/mariadb-10.4` +* 10.4 \(available for compatibility only, no longer officially supported\) - `uselagoon/mariadb-10.4` * 10.5 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb/10.5.Dockerfile) (Alpine 3.14 Support until May 2023) - `uselagoon/mariadb-10.5` * 10.6 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb/10.6.Dockerfile) (Alpine 3.16 Support until May 2024) - `uselagoon/mariadb-10.6` * 10.11 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mariadb/10.11.Dockerfile) (Alpine 3.18 Support until May 2025) - `uselagoon/mariadb-10.11` diff --git a/docs/docker-images/mysql.md b/docs/docker-images/mysql.md new file mode 100644 index 0000000000..b97102265d --- /dev/null +++ b/docs/docker-images/mysql.md @@ -0,0 +1,96 @@ +# MySQL + +MySQL is a widely used, open-source relational database management system (RDBMS). + +The [Lagoon `MySQL` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mysql/8.4.Dockerfile). Based on the official upstream docker image [`mysql`](https://hub.docker.com/_/mysql) (Oracle Linux variant). + +This Dockerfile is intended to be used to set up a standalone MySQL database server, intended for use in Local Development + +* 8.0 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mysql/8.0.Dockerfile) (Extended Support until April 2026) - `uselagoon/mysql-8.0` +* 8.4 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/mysql/8.4.Dockerfile) (Extended Support until April 2032) - `uselagoon/mysql-8.4` + +!!! Info + These images are not intended as drop-in alernatives to MariaDB images, and as such, may require customization to run in local development environments + +## Lagoon adaptions + +The default exposed port of MySQL containers is port `3306`. + +To allow Lagoon to select the best way to run the MySQL container, use `lagoon.type: mariadb` - this allows the DBaaS operator to provision a cloud database if available in the cluster. Use `lagoon.type: mariadb-single` to specifically request MySQL in a container. Persistent storage is always provisioned for MySQL containers at `/var/lib/mysql`. + +This image is prepared to be used on Lagoon. There are therefore some things already done: + +* Folder permissions are automatically adapted with [`fix-permissions`](https://github.com/uselagoon/lagoon-images/blob/main/images/commons/fix-permissions), so this image will work with a random user. +* `readiness-probe.sh` script to check when MySQL container is ready. + +## `docker-compose.yml` snippet for non-Drupal projects + +```yaml title="docker-compose.yml" + mysql: + image: uselagoon/mysql-8.4:latest + labels: + # tells Lagoon this is a MariaDB-compatible database + lagoon.type: mariadb + ports: + # exposes the port 3306 with a random local port, find it with `docker compose port mysql 3306` + - "3306" + volumes: + # mounts a named volume at the default path for MySQL + - db:/var/lib/mysql +``` +## `docker-compose.yml` snippet for Drupal projects + +```yaml title="docker-compose.yml" + mariadb: + image: uselagoon/mysql-8.4:latest + labels: + # tells Lagoon this is a MariaDB-compatible database + lagoon.type: mariadb + ports: + # exposes the port 3306 with a random local port, find it with `docker compose port mariadb 3306` + - "3306" + environment: + # These override the default credentials to match what Drupal is hardwired to expect in Lagoon + - MYSQL_DATABASE=drupal + - MYSQL_USER=drupal + - MYSQL_PASSWORD=drupal + volumes: + # mounts a named volume at the default path for MariaDB + - db:/var/lib/mysql +``` + +## Included tools + +* [`mysqltuner.pl`](https://github.com/major/MySQLTuner-perl) - Perl script useful for database parameter tuning. +* [`mysql-backup.sh`](https://github.com/uselagoon/lagoon-images/blob/main/images/mysql/mysql-backup.sh) - Script for automating the daily MySQL backups on development environment. +* [`pwgen`](https://linux.die.net/man/1/pwgen) - Utility to generate random and complex passwords. + +## Included `my.cnf` configuration file + +The image ships a _default_ MySQL configuration file, optimized to work on +Lagoon. Some options are configurable via [environment +variables](../concepts-advanced/environment-variables.md). + +## Environment Variables + +| Environment Variable | Default | Description | +| :--------------------------------- | :-------------------- | :--------------------------------------------------------------------------- | +| MYSQL_DATABASE | lagoon | Database name created at startup. | +| MYSQL_USER | lagoon | Default user created at startup. | +| MYSQL_PASSWORD | lagoon | Password of default user created at startup. | +| MYSQL_ROOT_PASSWORD | Lag00n | MySQL root user's password. | +| MYSQL_CHARSET | utf8mb4 | Set the server charset. | +| MYSQL_COLLATION | utf8mb4_bin | Set server collation. | +| MYSQL_MAX_ALLOWED_PACKET | 64M | Set the `max_allowed_packet` size. | +| MYSQL_INNODB_BUFFER_POOL_SIZE | 256M | Set the MySQL InnoDB buffer pool size. | +| MYSQL_INNODB_BUFFER_POOL_INSTANCES | 1 | Number of InnoDB buffer pool instances. | +| MYSQL_INNODB_LOG_FILE_SIZE | 64M | Size of InnoDB log file. | +| MYSQL_LOG_SLOW | (not set) | Variable to control the save of slow queries. | +| MYSQL_LOG_QUERIES | (not set) | Variable to control the save of ALL queries. | +| BACKUPS_DIR | /var/lib/mysql/backup | Default path for databases backups. | +| MYSQL_DATA_DIR | /var/lib/mysql | Path of the MySQL data dir, be careful, changing this can occur data loss! | +| MYSQL_COPY_DATA_DIR_SOURCE | (not set) | Path which the entrypoint script of MySQL will use to copy into the defined `MYSQL_DATA_DIR`, this can be used for prepopulating the MySQL with a database. The scripts expects actual MySQL data files and not a sql file! Plus it only copies data if the destination does not already have a MySQL datadir in it. | + +If the `LAGOON_ENVIRONMENT_TYPE` variable is set to `production`, performances +are set accordingly by using `MYSQL_INNODB_BUFFER_POOL_SIZE=1024` and +`MYSQL_INNODB_LOG_FILE_SIZE=256`. diff --git a/docs/docker-images/nodejs.md b/docs/docker-images/nodejs.md index 51a69f663e..51d5279247 100644 --- a/docs/docker-images/nodejs.md +++ b/docs/docker-images/nodejs.md @@ -11,8 +11,9 @@ The builder variant of those images comes with additional tooling that is needed * 12 \(available for compatibility only, no longer officially supported\) - `uselagoon/node-12` * 14 \(available for compatibility only, no longer officially supported\) - `uselagoon/node-14` * 16 \(available for compatibility only, no longer officially supported\) - `uselagoon/node-16` -* 18 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/node/18.Dockerfile) (Security Support until April 2025) - `uselagoon/node-18` +* 18 \(available for compatibility only, no longer officially supported\) - `uselagoon/node-18` * 20 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/node/20.Dockerfile) (Security Support until April 2026) - `uselagoon/node-20` +* 22 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/node/22.Dockerfile) (Security Support until April 2027) - `uselagoon/node-22` !!! Tip We stop updating EOL Node.js images usually with the Lagoon release that comes after the officially communicated EOL date: [https://nodejs.org/en/about/releases/](https://nodejs.org/en/about/releases/). diff --git a/docs/docker-images/postgres.md b/docs/docker-images/postgres.md index 7a2846adf6..cb8c61699a 100644 --- a/docs/docker-images/postgres.md +++ b/docs/docker-images/postgres.md @@ -4,7 +4,7 @@ The [Lagoon PostgreSQL Docker image](https://github.com/uselagoon/lagoon-images/ ## Supported versions -* 11 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/postgres/11.Dockerfile) (Security Support until November 2023) - `uselagoon/postgres-11` +* 11 \(available for compatibility only, no longer officially supported\) - `uselagoon/postgres-11` * 12 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/postgres/12.Dockerfile) (Security Support until November 2024) - `uselagoon/postgres-12` * 13 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/postgres/13.Dockerfile) (Security Support until November 2025) - `uselagoon/postgres-13` * 14 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/postgres/14.Dockerfile) (Security Support until November 2026) - `uselagoon/postgres-14` diff --git a/docs/docker-images/redis.md b/docs/docker-images/redis.md index 67962c9a9b..bd33c1a452 100644 --- a/docs/docker-images/redis.md +++ b/docs/docker-images/redis.md @@ -1,6 +1,6 @@ # Redis -[Lagoon `Redis` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/redis), based on [offical `redis:alpine` image](https://hub.docker.com/_/redis/). +[Lagoon `Redis` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/redis), based on [official `redis:alpine` image](https://hub.docker.com/_/redis/). This Dockerfile is intended to be used to set up a standalone Redis _ephemeral_ server by default. @@ -53,11 +53,11 @@ variables](../concepts-advanced/environment-variables.md). ## Custom configuration By building on the base image you can include custom configuration. -See [https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf](https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf) for full documentation of the Redis configuration file. +See [https://github.com/redis/redis/blob/7.2.5/redis.conf](https://github.com/redis/redis/blob/7.2.5/redis.conf) for full documentation of the Redis configuration file. ## Redis-persistent -Based on the [Lagoon `redis` image](https://github.com/uselagoon/lagoon-images/blob/main/images/redis/5.Dockerfile), the [Lagoon `redis-persistent` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/redis-persistent/5.Dockerfile) is intended for use when the Redis service must be utilized in `persistent` mode \(ie. with a persistent volume where keys will be saved to disk\). +Based on the [Lagoon `redis` image](https://github.com/uselagoon/lagoon-images/blob/main/images/redis/6.Dockerfile), the [Lagoon `redis-persistent` Docker image](https://github.com/uselagoon/lagoon-images/blob/main/images/redis-persistent/6.Dockerfile) is intended for use when the Redis service must be utilized in `persistent` mode \(ie. with a persistent volume where keys will be saved to disk\). It differs from `redis` only with the `FLAVOR` environment variable, which will use the [respective Redis configuration](https://github.com/uselagoon/lagoon-images/tree/main/images/redis/conf) according to the version of redis in use. diff --git a/docs/docker-images/ruby.md b/docs/docker-images/ruby.md index 8a3d1cd114..4bc3a32e84 100644 --- a/docs/docker-images/ruby.md +++ b/docs/docker-images/ruby.md @@ -4,9 +4,11 @@ The [Lagoon `ruby` Docker image](https://github.com/uselagoon/lagoon-images/tree ## Supported Versions -* 3.0 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/ruby/3.0.Dockerfile) (Security Support until March 2024) - `uselagoon/ruby-3.0` +* 3.0 \(available for compatibility only, no longer officially supported\) - `uselagoon/ruby-3.0` * 3.1 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/ruby/3.1.Dockerfile) (Security Support until March 2025) - `uselagoon/ruby-3.1` * 3.2 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/ruby/3.2.Dockerfile) (Security Support until March 2026) - `uselagoon/ruby-3.2` +* 3.3 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/ruby/3.3.Dockerfile) (Security Support until March 2027) - `uselagoon/ruby-3.3` + !!! Tip We stop updating and publishing EOL Ruby images usually with the Lagoon release that comes after the officially communicated EOL date: [https://www.ruby-lang.org/en/downloads/releases/](https://www.ruby-lang.org/en/downloads/releases/). Previous versions will remain available. diff --git a/docs/docker-images/solr.md b/docs/docker-images/solr.md index 35c34e03f4..05cb8540b4 100644 --- a/docs/docker-images/solr.md +++ b/docs/docker-images/solr.md @@ -9,8 +9,9 @@ This Dockerfile is intended to be used to set up a standalone Solr server with a * 5.5 \(available for compatibility only, no longer officially supported\) * 6.6 \(available for compatibility only, no longer officially supported\) * 7.7 \(available for compatibility only, no longer officially supported\) -* 7 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/7.Dockerfile) - `uselagoon/solr-7` +* 7 \(available for compatibility only, no longer officially supported\) - `uselagoon/solr-7` * 8 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/8.Dockerfile) - `uselagoon/solr-8` +* 9 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/9.Dockerfile) - `uselagoon/solr-9` ## Lagoon adaptions diff --git a/docs/ja/docker-images/redis.md b/docs/ja/docker-images/redis.md index 5036990131..00c692d1ad 100644 --- a/docs/ja/docker-images/redis.md +++ b/docs/ja/docker-images/redis.md @@ -52,11 +52,11 @@ Redisイメージには2つの異なるバリエーションがあります:** ## カスタム設定 ベースイメージに基づいて、カスタム設定を含めることができます。 -Redis設定ファイルの完全なドキュメンテーションについては、[こちら](https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf)をご覧ください。 +Redis設定ファイルの完全なドキュメンテーションについては、[こちら](https://github.com/redis/redis/blob/7.2.5/redis.conf)をご覧ください。 ## Redis-persistent -以下に基づいています [Lagoonの `redis`イメージ](https://github.com/uselagoon/lagoon-images/blob/main/images/redis/5.Dockerfile)、[Lagoonの `redis-persistent` Dockerイメージ](https://github.com/uselagoon/lagoon-images/blob/main/images/redis-persistent/5.Dockerfile)は、Redisサービスを`persistent`モード(つまり、キーがディスクに保存される永続化ボリュームで)で利用する場合に使われます。 +以下に基づいています [Lagoonの `redis`イメージ](https://github.com/uselagoon/lagoon-images/blob/main/images/redis/6.Dockerfile)、[Lagoonの `redis-persistent` Dockerイメージ](https://github.com/uselagoon/lagoon-images/blob/main/images/redis-persistent/6.Dockerfile)は、Redisサービスを`persistent`モード(つまり、キーがディスクに保存される永続化ボリュームで)で利用する場合に使われます。 これは`redis`との違いは、`FLAVOR`環境変数だけで、それは使用中のredisのバージョンにより、[それぞれのRedis設定](https://github.com/uselagoon/lagoon-images/tree/main/images/redis/conf)を使用します。 diff --git a/mkdocs.yml b/mkdocs.yml index 0995c97082..66a781035e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -36,6 +36,7 @@ nav: - Commons: docker-images/commons.md - MariaDB: docker-images/mariadb.md - MongoDB: docker-images/mongodb.md + - MySQL: docker-images/mysql.md - Node.js: docker-images/nodejs.md - NGINX: docker-images/nginx.md - OpenSearch: docker-images/opensearch.md