summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDavid Mehren2021-04-13 21:27:35 +0200
committerDavid Mehren2021-04-16 21:19:11 +0200
commit2667b642f4b5aeef9ec0166d0c5986e0605d60e2 (patch)
tree22b23be0f9669bbb57b71a220bbb29b6875bdf2a /docs
parentc54eef10a6bc290e6b3151cfb82e867ec1759c44 (diff)
Docs: Include docker-compose snippet
Directing users to use the container repo to install HedgeDoc has caused upgrade-trouble in the past, after we made incompatible changes to the docker-compose.yml in the repo. This commit inserts a minimal docker-compose snipped in the docs, which can be used to get started. Upgrading can then be performed by just incrementing the referenced image version. Signed-off-by: David Mehren <git@herrmehren.de>
Diffstat (limited to 'docs')
-rw-r--r--docs/content/setup/docker.md52
1 files changed, 37 insertions, 15 deletions
diff --git a/docs/content/setup/docker.md b/docs/content/setup/docker.md
index abb339b3..1b162399 100644
--- a/docs/content/setup/docker.md
+++ b/docs/content/setup/docker.md
@@ -6,18 +6,46 @@
- [Docker Compose](https://docs.docker.com/compose/install/)
The official docker images are [available on quay.io](https://quay.io/repository/hedgedoc/hedgedoc).
-We currently only support the AMD64 architecture.
+We currently only support the `amd64` architecture.
The easiest way to get started with HedgeDoc and Docker is to use the following `docker-compose.yml`:
-```shell
-git clone https://github.com/hedgedoc/container.git hedgedoc-container
-cd hedgedoc-container
-docker-compose up
+!!! warning
+ This is a minimal example to get started quickly and not intended for production use.
+
+```yaml
+version: '3'
+services:
+ database:
+ image: postgres:9.6-alpine
+ environment:
+ - POSTGRES_USER=hedgedoc
+ - POSTGRES_PASSWORD=password
+ - POSTGRES_DB=hedgedoc
+ volumes:
+ - database:/var/lib/postgresql/data
+ restart: always
+ app:
+ # Make sure to use the latest release from https://hedgedoc.org/latest-release
+ image: quay.io/hedgedoc/hedgedoc:1.7.2
+ environment:
+ - CMD_DB_URL=postgres://hedgedoc:password@database:5432/hedgedoc
+ - CMD_DOMAIN=localhost
+ - CMD_URL_ADDPORT=true
+ volumes:
+ - uploads:/hedgedoc/public/uploads
+ ports:
+ - "3000:3000"
+ restart: always
+ depends_on:
+ - database
+volumes:
+ database:
+ uploads:
```
-HedgeDoc should now be available at http://127.0.0.1:3000.
-You can configure your container with a config file or with env vars.
+After executing `docker-compose up`, HedgeDoc should be available at [http://127.0.0.1:3000](http://127.0.0.1:3000).
+You can now continue to configure your container with environment variables.
Check out [the configuration docs](/configuration) for more details.
## Upgrading
@@ -37,14 +65,8 @@ Check out [the configuration docs](/configuration) for more details.
```
before running `docker-compose up`.
-You can upgrade to the latest release using these commands:
-
-```shell
-cd hedgedoc-container # Enter the directory you previously cloned into
-git pull # Pull new commits
-docker-compose pull # Pull new container images
-docker-compose up # Start with the new images
-```
+You can upgrade to the latest release by stopping the containers and changing the referenced image version in `docker-compose.yml`.
+Then run `docker-compose up` to start HedgeDoc again.
### Migrating from HackMD