Repository navigation
Document the plone/nick container image - #2119
Merged
Merged
Conversation
Add a page for the official plone/nick image: its tags, running it with PostgreSQL, a Docker Compose stack that splits the migrate, api and worker modules, selecting modules, the configuration variables and add-ons. The deployment guide of Nick is linked, not repeated. Add the image to the official images table and the toctree. Refs #2118
sneridagh
previously approved these changes
Oct 31, 2026
The docker run flow kept the database and uploaded files in the container, so removing a container lost them. Create the nick-data and nick-blobs volumes and mount them on the database and on Nick, and explain what each volume holds and what removing it deletes. The Compose section now says what its volumes hold and that docker compose down -v deletes them. Refs #2118
sneridagh
approved these changes
Oct 31, 2026
Member
Author
|
I'm merging as the |
stevepiercy
requested changes
Oct 31, 2026
stevepiercy
left a comment
Member
There was a problem hiding this comment.
Merged too quick. Would you please incorporate these changes, and see my questions? Thank you!
|
|
||
| - `3.0` points to the newest 3.0.x release. | ||
| - `3` points to the newest 3.x release. | ||
| - `latest` points to the version in the `version.txt` file of the repository. |
Member
There was a problem hiding this comment.
Suggested change
| - `latest` points to the version in the `version.txt` file of the repository. | |
| - `latest` points to the version in the {file}`version.txt` file of the repository. |
| - `latest` points to the version in the `version.txt` file of the repository. | ||
|
|
||
| A prerelease, such as `3.1.0-alpha.1`, gets only its own tag. | ||
| It does not move `latest`, `3` or `3.0`. |
Member
There was a problem hiding this comment.
Suggested change
| It does not move `latest`, `3` or `3.0`. | |
| It does not move `latest`, `3`, or `3.0`. |
| Then use the digest in place of the tag, as `plone/nick@sha256:<digest>`. | ||
|
|
||
|
|
||
| ## Using this image |
Member
There was a problem hiding this comment.
Suggested change
| ## Using this image | |
| ## Usage | |
| This section describes how to use the `plone/nick` image. |
| ### Run with PostgreSQL | ||
|
|
||
| The image runs `nick`, which migrates the database, installs the profiles, and starts the API on port 8080 and the job worker. | ||
| Set `DB_PASSWORD` and `SECRET`; the container stops at startup if either one is missing. |
|
|
||
| A named volume is storage that Docker manages, and it outlives the container that uses it. | ||
| The `nick-data` volume keeps the database, and the `nick-blobs` volume keeps the uploaded files in the default `file` blob storage. | ||
| Without them, removing a container removes the data it holds. |
Member
There was a problem hiding this comment.
Suggested change
| Without them, removing a container removes the data it holds. | |
| With these named volumes, it's possible to remove the container without removing the data and files it holds. |
| Read the [Add-ons](https://nick.docs.plone.org/developer-guide/addons) chapter of the Nick documentation for how to write one. | ||
|
|
||
| The `ADDONS` variable installs add-ons every time the container starts. | ||
| Use it only to try an add-on out, and build an image for production. |
Member
There was a problem hiding this comment.
Suggested change
| Use it only to try an add-on out, and build an image for production. | |
| Use it only to try out an add-on, and build an image for production. |
| ENV PROFILES=@plone/nick:core,@acme/nick-addon:default | ||
| ``` | ||
|
|
||
| Read the [Add-ons](https://nick.docs.plone.org/developer-guide/addons) chapter of the Nick documentation for how to write one. |
Member
There was a problem hiding this comment.
Got intersphinx? Not sure what Nick uses to build docs.
| | `/app/config.ts` | A `config.ts` file mounted at this path replaces the environment configuration. | | ||
|
|
||
| Nick reads other settings from the environment as well. | ||
| For the full list, and for the settings of a production deployment, see the [Deployment](https://nick.docs.plone.org/admin-guide/deployment) guide in the Nick documentation. |
Member
There was a problem hiding this comment.
Got intersphinx? Not sure what Nick uses to build docs.
| | `NICK_MODULES` | Modules to run: `migrate`, `api` or `worker`, separated by commas. Default: all of them. | | ||
| | `PORT` | Port where the API listens. Default: `8080`. | | ||
| | `ALLOWED_ORIGINS` | Origins that CORS allows, such as the address of the frontend. | | ||
| | `BLOBS_DIR` | Directory of the `file` blob storage. Default: `/app/var/blobstorage`. Mount a volume there, or use the `db` or `s3` blob storage. | |
Member
There was a problem hiding this comment.
Suggested change
| | `BLOBS_DIR` | Directory of the `file` blob storage. Default: `/app/var/blobstorage`. Mount a volume there, or use the `db` or `s3` blob storage. | | |
| | `BLOBS_DIR` | Directory of the `file` blob storage. Default: {file}`/app/var/blobstorage`. Mount a volume there, or use the `db` or `s3` blob storage. | |
|
|
||
| The `migrate` module exits with a non-zero status when it hits errors. | ||
| Each command needs the database and secret variables from the previous section. | ||
| To set the modules with an environment variable instead, use `-e NICK_MODULES=api`. |
Member
There was a problem hiding this comment.
Suggested change
| To set the modules with an environment variable instead, use `-e NICK_MODULES=api`. | |
| To set the modules with an environment variable instead. | |
| For example, for the `api` module, use the following: | |
| ```shell | |
| docker run plone/nick -e NICK_MODULES=api | |
| ``` |
ericof
added a commit
that referenced
this pull request
Oct 31, 2026
Follow-up to #2119 with the changes stevepiercy requested. Say how to pass the required variables, show the commands that remove containers and volumes, and put the environment variable option before the image name, where docker run reads it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
plone/nickimage is published, but the Containers section doesn't mention it. This addsdocs/install/containers/images/nick.mdand lists it among the official images.The new page covers:
DB_PASSWORDandSECRETas the required settingsmigrate,apiandworkercontainersADDONSfor trying them out onlyThe Compose stack lives on the image page, as it does for
plone/aurora, rather than underexamples/. Nick's deployment guidance stays in the Nick documentation, which the page links to.Note for reviewers: without
PROFILES, the image installs the demo site with anadminuser whose password isadmin. The page warns about this because it matters for anyone copying the examples to production.The README's plain
docker runexample setsDB_HOST=dbbut starts no database that the container can reach under that name, so it fails with a host lookup error. The page creates a Docker network and a PostgreSQL container first, and runs Nick on that network.Closes #2118