Skip to content

Commit

Permalink
docs, README: Update Docker instructions
Browse files Browse the repository at this point in the history
Mention the official image and be a bit more clear about
config requirements.
  • Loading branch information
ix5 committed Jun 5, 2022
1 parent a81423d commit 1499a3e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ CMD ["/isso/bin/gunicorn", "-b", "0.0.0.0:8080", "-w", "4", "--preload", "isso.r
# $ docker build -t isso .
#
# Run:
# $ mkdir config
# $ cp contrib/isso-dev.conf config/isso.cfg
# $ mkdir db/
# $ docker run -d --rm --name isso -p 8080:8080 -v $PWD/config:/config -v $PWD/db:/db isso:latest
# $ mkdir -p config/ db/
# $ cp contrib/isso.sample.cfg config/isso.cfg
# Set 'dbpath' to '/db/comments.db' and adjust 'host'
# $ docker run -d --rm --name isso -p 127.0.0.1:8080:8080 -v $PWD/config:/config -v $PWD/db:/db isso:latest
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ If you're stuck, follow the [Install guide](https://isso-comments.de/docs/refere
see [Troubleshooting](https://isso-comments.de/docs/guides/troubleshooting/) and browse
the [the full documentation](https://isso-comments.de/docs/).

## Docker

A Docker image with the latest stable release is provided at
`ghcr.io/isso-comments/isso:latest`. See
[Using Docker](https://isso-comments.de/docs/reference/installation/#using-docker).

## Contributing
- Pull requests are very much welcome! These might be
[good first issues](https://github.com/posativ/isso/labels/good-first-issue)
Expand Down
35 changes: 29 additions & 6 deletions docs/docs/reference/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,39 @@ Prebuilt Packages

* Arch Linux: https://aur.archlinux.org/packages/isso/

Build a Docker image
--------------------
.. _using-docker:

You can get a Docker image by running ``docker build . -t isso``.
Assuming you have your configuration in ``/opt/isso``, you can use the
following command to spawn the Docker container:
Using Docker
------------

Assuming you have your configuration in ``/opt/isso``, with
``dbpath=/db/comments.db`` and ``host`` set properly in ``isso.cfg``, you have
two options for running a Docker container:

a) Official Docker image
^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: console
$ docker pull ghcr.io/isso-comments/isso:latest
$ docker run -d --rm --name isso -p 127.0.0.1:8080:8080 \
-v /opt/isso:/config -v /opt/isso:/db \
ghcr.io/isso-comments/isso:latest
b) Build a Docker image yourself
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can build a Docker image by running ``make docker``, which will be tagged
as ``isso:latest``.

.. code-block:: console
$ docker run -d --rm --name isso -p 127.0.0.1:8080:8080 -v /opt/isso:/config -v /opt/isso:/db isso
$ mkdir -p config/ db/
$ cp contrib/isso.sample.cfg config/isso.cfg
# Set 'dbpath' to '/db/comments.db' and adjust 'host'
$ docker run -d --rm --name isso -p 127.0.0.1:8080:8080 \
-v $PWD/config:/config -v $PWD/db:/db \
isso:latest
Then, you can use a reverse proxy to expose port 8080.

Expand Down

0 comments on commit 1499a3e

Please sign in to comment.