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

Joomla Update #2462

Merged
merged 6 commits into from
Jul 8, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Update Joomla Docker documentation to improve clarity and enhance con…
…figuration options

- Changed container network configuration to use Docker networks instead of linking containers.
- Introduced new environment variables for database configuration:
  - `JOOMLA_DB_PASSWORD_FILE`: Path to a file containing the database password.
  - `JOOMLA_DB_TYPE`: Database type with options for "mysqli" and "pgsql".
- Added environment variables for auto-deployment configuration:
  - `JOOMLA_SITE_NAME`, `JOOMLA_ADMIN_USER`, `JOOMLA_ADMIN_USERNAME`, `JOOMLA_ADMIN_PASSWORD`, `JOOMLA_ADMIN_EMAIL`
  - `JOOMLA_EXTENSIONS_URLS`, `JOOMLA_EXTENSIONS_PATHS`
  - `JOOMLA_SMTP_HOST`, `JOOMLA_SMTP_HOST_PORT`
- Updated port mapping instructions to reflect the new network setup.
- Corrected the Dockerfile reference link for adding additional PHP extensions.

These changes improve the setup process, provide more flexible configuration options, and correct outdated references.
  • Loading branch information
Llewellynvdm committed Jul 5, 2024
commit 7eb9c65e1cf16cc4335626ebdff53203b1816d37
36 changes: 25 additions & 11 deletions joomla/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,45 @@ Joomla is a free and open-source content management system (CMS) for publishing
# How to use this image

```console
$ docker run --name some-%%REPO%% --link some-mysql:mysql -d %%IMAGE%%
$ docker run --name some-%%REPO%% --network some-network -d %%IMAGE%%
Llewellynvdm marked this conversation as resolved.
Show resolved Hide resolved
```

The following environment variables are also honored for configuring your Joomla instance:
The following environment variables are honored for configuring your Joomla instance:

- `-e JOOMLA_DB_HOST=...` (defaults to the IP and port of the linked `mysql` container)
- `-e JOOMLA_DB_USER=...` (defaults to "root")
- `-e JOOMLA_DB_PASSWORD=...` (defaults to the value of the `MYSQL_ROOT_PASSWORD` environment variable from the linked `mysql` container)
- `-e JOOMLA_DB_NAME=...` (defaults to "joomla")
- `-e JOOMLA_DB_HOST=...` (defaults to the IP and port of the linked `mysql` container)
- `-e JOOMLA_DB_USER=...` (defaults to "root")
- `-e JOOMLA_DB_PASSWORD=...` (defaults to the value of the `MYSQL_ROOT_PASSWORD` environment variable from the linked `mysql` container)
- `-e JOOMLA_DB_PASSWORD_FILE=...` (path to a file containing the database password)
- `-e JOOMLA_DB_NAME=...` (defaults to "joomla")
- `-e JOOMLA_DB_TYPE=...` (defaults to "mysqli" options: mysqli, pgsql)

If the `JOOMLA_DB_NAME` specified does not already exist on the given MySQL server, it will be created automatically upon startup of the `%%REPO%%` container, provided that the `JOOMLA_DB_USER` specified has the necessary permissions to create it.

The following environment variables are also honored for configuring auto deployment (skip the browser setup) for your Joomla instance:

- `-e JOOMLA_SITE_NAME=...` (name of the Joomla site)
- `-e JOOMLA_ADMIN_USER=...` (full name of the Joomla administrator)
- `-e JOOMLA_ADMIN_USERNAME=...` (username of the Joomla administrator)
- `-e JOOMLA_ADMIN_PASSWORD=...` (password of the Joomla administrator)
- `-e JOOMLA_ADMIN_EMAIL=...` (email address of the Joomla administrator)
- `-e JOOMLA_EXTENSIONS_URLS=...` (semicolon-separated list of URLs to install Joomla extensions from)
- `-e JOOMLA_EXTENSIONS_PATHS=...` (semicolon-separated list of file paths to install Joomla extensions from)
- `-e JOOMLA_SMTP_HOST=...` (SMTP host for outgoing email)
- `-e JOOMLA_SMTP_HOST_PORT=...` (SMTP port for outgoing email)

If you'd like to be able to access the instance from the host without the container's IP, standard port mappings can be used:

```console
$ docker run --name some-%%REPO%% --link some-mysql:mysql -p 8080:80 -d %%IMAGE%%
$ docker run --name some-%%REPO%% --network joomla-network -p 8080:80 -d %%IMAGE%%
```

Then, access it via `http://localhost:8080` or `http://host-ip:8080` in a browser.

If you'd like to use an external database instead of a linked `mysql` container, specify the hostname and port with `JOOMLA_DB_HOST` along with the password in `JOOMLA_DB_PASSWORD` and the username in `JOOMLA_DB_USER` (if it is something other than `root`):
If you'd like to use an external database instead of a MySQL container, specify the hostname and port with `JOOMLA_DB_HOST` along with the password in `JOOMLA_DB_PASSWORD` and the username in `JOOMLA_DB_USER` (if it is something other than `root`):

```console
$ docker run --name some-%%REPO%% -e JOOMLA_DB_HOST=10.1.2.3:3306 \
-e JOOMLA_DB_USER=... -e JOOMLA_DB_PASSWORD=... -d %%REPO%%
$ docker run --name some-%%REPO%% --network joomla-network -e JOOMLA_DB_HOST=10.1.2.3:3306 \
-e JOOMLA_DB_USER=... -e JOOMLA_DB_PASSWORD=... -d %%IMAGE%%
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be %%REPO%% or %%IMAGE%%

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should be %%IMAGE%% and is an excellent catch we clearly missed previously! 😄

```

## %%STACK%%
Expand All @@ -44,7 +58,7 @@ Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml

This image does not provide any additional PHP extensions or other libraries, even if they are required by popular plugins. There are an infinite number of possible plugins, and they potentially require any extension PHP supports. Including every PHP extension that exists would dramatically increase the image size.

If you need additional PHP extensions, you'll need to create your own image `FROM` this one. The [documentation of the `php` image](https://github.com/docker-library/docs/blob/master/php/README.md#how-to-install-more-php-extensions) explains how to compile additional extensions. Additionally, the [`%%REPO%%` Dockerfile](https://github.com/joomla/docker-joomla/blob/966275ada2148e343a68c8c03870f11cc7f5b89c/apache/Dockerfile#L7-L11) has an example of doing this.
If you need additional PHP extensions, you'll need to create your own image `FROM` this one. The [documentation of the `php` image](https://github.com/docker-library/docs/blob/master/php/README.md#how-to-install-more-php-extensions) explains how to compile additional extensions. Additionally, the [`%%REPO%%` Dockerfile](https://github.com/joomla-docker/docker-joomla/blob/360f6bd96c80f72b020d2d9c8aae9daa6bca2887/5.1/php8.3/apache/Dockerfile#L51-L64) has an example of doing this.

The following Docker Hub features can help with the task of keeping your dependent images up-to-date:

Expand Down
Loading