Skip to content

Commit

Permalink
Merge pull request #3741 from uselagoon/docs/update_jun2024
Browse files Browse the repository at this point in the history
docs: update available base images
  • Loading branch information
tobybellwood authored Jun 27, 2024
2 parents 23562e1 + c30fae4 commit c4572ea
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/docker-images/mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
96 changes: 96 additions & 0 deletions docs/docker-images/mysql.md
Original file line number Diff line number Diff line change
@@ -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`.
3 changes: 2 additions & 1 deletion docs/docker-images/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
Expand Down
2 changes: 1 addition & 1 deletion docs/docker-images/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
6 changes: 3 additions & 3 deletions docs/docker-images/redis.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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.

Expand Down
4 changes: 3 additions & 1 deletion docs/docker-images/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion docs/docker-images/solr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/ja/docker-images/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)を使用します。

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4572ea

Please sign in to comment.