Skip to content

Commit

Permalink
docs(docker): Document how to deploy a previous version of an image, c…
Browse files Browse the repository at this point in the history
…loses #527
  • Loading branch information
jpmckinney committed Oct 16, 2024
1 parent 8c6857f commit 46b5458
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/deploy/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ Migrate the database, for example:
docker compose run --rm --name my-app-superuser cron python manage.py createsuperuser
Revert images
~~~~~~~~~~~~~

#. Find the SHA of the previous image:

.. code-block:: bash
docker image ls --digests
If the previous image has been pruned, visit the package's page, like `kingfisher-process-django <https://github.com/open-contracting/kingfisher-process/pkgs/container/kingfisher-process-django/versions>`__.

#. Change the image in the Docker Compose file from ``myproject:latest`` to ``myproject@sha256:0ed5d59...``.

#. Start new containers:

.. code-block:: bash
docker compose pull
docker compose up -d
Load data
---------

Expand Down

0 comments on commit 46b5458

Please sign in to comment.