Reference non-existent farmos/farmos:2.x.y Docker tag in production hosting docs/examples.

By doing this, we will be forcing the end-user to follow best
practice by making an intentional decision about the version
they will use. We do not want farmos/farmos:2.x to be referenced
by default in the docs, otherwise we will be directing folks to
use the development branch, which may not be stable, and may
change if they update the image via `docker pull`. We also don't
want to recommend farmos/farmos:latest, for a similar reason:
when updating between versions it is important to manually run
update.php. By forcing intentional version use and updates, we
encourage best practice for updates as well.
This commit is contained in:
Michael Stenta 2021-12-23 06:40:31 -05:00
parent 73c3740322
commit 394daa9f06
3 changed files with 11 additions and 7 deletions

View File

@ -16,9 +16,9 @@ container at `/opt/drupal`, which allows for local development with an IDE.
## Production environment
To run a farmOS production environment, use `docker-compose.production.yml` as
an example for building your own configuration. Note that this example does not
include a database. It is assumed that in production environments the database
will be managed outside of Docker.
an example for building your own configuration. It references a non-existent
`farmos/farmos:x.y.z` image version tag, which should be replaced with the most
recent farmOS stable release version.
This example mounts a local `sites` directory on the host as a volume in the
container at `/opt/drupal/web/sites`, which contains the site-specific settings
@ -27,4 +27,7 @@ simply pulling a new image (and then manually running database updates via Drush
or `/update.php`). Everything outside of the `sites` directory will not be
preserved and will be replaced with the new official farmOS files.
Note that this example does not include a database. It is assumed that in
production environments the database will be managed outside of Docker.
For more information, see https://farmOS.org/hosting.

View File

@ -1,7 +1,8 @@
version: '3'
services:
www:
image: farmos/farmos:2.x
# Update this to the latest stable version before deploying.
image: farmos/farmos:2.x.y
volumes:
- './sites:/opt/drupal/web/sites'
ports:

View File

@ -85,8 +85,8 @@ Official farmOS Docker images are available on Docker Hub:
This allows farmOS to be run in a Docker container with:
docker pull farmos/farmos:2.x
docker run --rm -p 80:80 -v "${PWD}/sites:/opt/drupal/web/sites" farmos/farmos:2.x
docker pull farmos/farmos:2.x.y
docker run --rm -p 80:80 -v "${PWD}/sites:/opt/drupal/web/sites" farmos/farmos:2.x.y
This will pull the farmOS Docker image, provision a farmOS web server container
listening on port 80, and bind-mount a `sites` directory into the container for
@ -99,7 +99,7 @@ persistence of settings and uploaded files.
An example `docker-compose.production.yml` configuration file is provided in
the farmOS repository's `docker` directory, with an accompanying `README.md`.
Copy this to a file named `docker-compose.yml` in the directory you would like
to install farmOS and run:
to install farmOS, update the `farmos/farmos:x.y.z` version reference, and run:
docker-compose up -d