aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-05-30 10:02:53 +0200
committerGitHub <noreply@github.com>2023-05-30 10:02:53 +0200
commitf956a8c1d9172f6bbfb9f7515feacd477a0e35f5 (patch)
tree18a02759cc674eb79b3b1b1168abd3d6d5a65e54 /build
parent11b557097c6745309c09b58f681080d3fcc4f9f5 (diff)
Docs restructure (#2953)
Needs to be merged into `gh-pages` later on.
Diffstat (limited to 'build')
-rw-r--r--build/docker/README.md17
-rw-r--r--build/docker/docker-compose.monolith.yml44
-rw-r--r--build/docker/docker-compose.yml52
-rwxr-xr-xbuild/docker/postgres/create_db.sh5
4 files changed, 59 insertions, 59 deletions
diff --git a/build/docker/README.md b/build/docker/README.md
index b66cb864..8d69b9af 100644
--- a/build/docker/README.md
+++ b/build/docker/README.md
@@ -6,23 +6,20 @@ They can be found on Docker Hub:
- [matrixdotorg/dendrite-monolith](https://hub.docker.com/r/matrixdotorg/dendrite-monolith) for monolith deployments
-## Dockerfiles
+## Dockerfile
-The `Dockerfile` is a multistage file which can build all four Dendrite
-images depending on the supplied `--target`. From the root of the Dendrite
+The `Dockerfile` is a multistage file which can build Dendrite. From the root of the Dendrite
repository, run:
```
-docker build . --target monolith -t matrixdotorg/dendrite-monolith
-docker build . --target demo-pinecone -t matrixdotorg/dendrite-demo-pinecone
-docker build . --target demo-yggdrasil -t matrixdotorg/dendrite-demo-yggdrasil
+docker build . -t matrixdotorg/dendrite-monolith
```
-## Compose files
+## Compose file
-There are two sample `docker-compose` files:
+There is one sample `docker-compose` files:
-- `docker-compose.monolith.yml` which runs a monolith Dendrite deployment
+- `docker-compose.yml` which runs a Dendrite deployment with Postgres
## Configuration
@@ -55,7 +52,7 @@ Create your config based on the [`dendrite-sample.yaml`](https://github.com/matr
Then start the deployment:
```
-docker-compose -f docker-compose.monolith.yml up
+docker-compose -f docker-compose.yml up
```
## Building the images
diff --git a/build/docker/docker-compose.monolith.yml b/build/docker/docker-compose.monolith.yml
deleted file mode 100644
index 1a8fe4ee..00000000
--- a/build/docker/docker-compose.monolith.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-version: "3.4"
-services:
- postgres:
- hostname: postgres
- image: postgres:14
- restart: always
- volumes:
- - ./postgres/create_db.sh:/docker-entrypoint-initdb.d/20-create_db.sh
- # To persist your PostgreSQL databases outside of the Docker image,
- # to prevent data loss, modify the following ./path_to path:
- - ./path_to/postgresql:/var/lib/postgresql/data
- environment:
- POSTGRES_PASSWORD: itsasecret
- POSTGRES_USER: dendrite
- healthcheck:
- test: ["CMD-SHELL", "pg_isready -U dendrite"]
- interval: 5s
- timeout: 5s
- retries: 5
- networks:
- - internal
-
- monolith:
- hostname: monolith
- image: matrixdotorg/dendrite-monolith:latest
- command: [
- "--tls-cert=server.crt",
- "--tls-key=server.key"
- ]
- ports:
- - 8008:8008
- - 8448:8448
- volumes:
- - ./config:/etc/dendrite
- - ./media:/var/dendrite/media
- depends_on:
- - postgres
- networks:
- - internal
- restart: unless-stopped
-
-networks:
- internal:
- attachable: true
diff --git a/build/docker/docker-compose.yml b/build/docker/docker-compose.yml
new file mode 100644
index 00000000..9397673f
--- /dev/null
+++ b/build/docker/docker-compose.yml
@@ -0,0 +1,52 @@
+version: "3.4"
+
+services:
+ postgres:
+ hostname: postgres
+ image: postgres:15-alpine
+ restart: always
+ volumes:
+ # This will create a docker volume to persist the database files in.
+ # If you prefer those files to be outside of docker, you'll need to change this.
+ - dendrite_postgres_data:/var/lib/postgresql/data
+ environment:
+ POSTGRES_PASSWORD: itsasecret
+ POSTGRES_USER: dendrite
+ POSTGRES_DATABASE: dendrite
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U dendrite"]
+ interval: 5s
+ timeout: 5s
+ retries: 5
+ networks:
+ - internal
+
+ monolith:
+ hostname: monolith
+ image: matrixdotorg/dendrite-monolith:latest
+ ports:
+ - 8008:8008
+ - 8448:8448
+ volumes:
+ - ./config:/etc/dendrite
+ # The following volumes use docker volumes, change this
+ # if you prefer to have those files outside of docker.
+ - dendrite_media:/var/dendrite/media
+ - dendrite_jetstream:/var/dendrite/jetstream
+ - dendrite_search_index:/var/dendrite/searchindex
+ depends_on:
+ postgres:
+ condition: service_healthy
+ networks:
+ - internal
+ restart: unless-stopped
+
+networks:
+ internal:
+ attachable: true
+
+volumes:
+ dendrite_postgres_data:
+ dendrite_media:
+ dendrite_jetstream:
+ dendrite_search_index: \ No newline at end of file
diff --git a/build/docker/postgres/create_db.sh b/build/docker/postgres/create_db.sh
deleted file mode 100755
index 27d2a4df..00000000
--- a/build/docker/postgres/create_db.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-for db in userapi_accounts mediaapi syncapi roomserver keyserver federationapi appservice mscs; do
- createdb -U dendrite -O dendrite dendrite_$db
-done