diff --git a/compose/dendrite/.env.example b/compose/dendrite/.env.example new file mode 100644 index 0000000..eb966db --- /dev/null +++ b/compose/dendrite/.env.example @@ -0,0 +1,8 @@ +POSTGRES_DATA_PATH="../../volumes/dendrite/postgres" +POSTGRES_PASSWORD="SUPER_SECRET_PASSWORD" +DENDRITE_HTTP_PORT="8008" +DENDRITE_HTTPS_PORT="8448" +DENDRITE_CONFIG_PATH="../../volumes/dendrite/config" +DENDRITE_MEDIA_PATH="../../volumes/dendrite/dendrite/media" +DENDRITE_JETSTREAM_PATH="../../volumes/dendrite/dendrite/jetstream" +DENDRITE_SEARCH_INDEX_PATH="../../volumes/dendrite/dendrite/search_index" \ No newline at end of file diff --git a/compose/dendrite/docker-compose.yml b/compose/dendrite/docker-compose.yml new file mode 100644 index 0000000..614efae --- /dev/null +++ b/compose/dendrite/docker-compose.yml @@ -0,0 +1,40 @@ +services: + postgres: + hostname: postgres + image: postgres:15-alpine + restart: always + volumes: + - "${POSTGRES_DATA_PATH:?}:/var/lib/postgresql/data" + environment: + POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:?}" + 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: ghcr.io/element-hq/dendrite-monolith:latest + ports: + - "${DENDRITE_HTTP_PORT:-8008}:8008" + - "${DENDRITE_HTTPS_PORT:-8448}:8448" + volumes: + - "${DENDRITE_CONFIG_PATH:?}:/etc/dendrite" + - "${DENDRITE_MEDIA_PATH:?}:/var/dendrite/media" + - "${DENDRITE_JETSTREAM_PATH:?}:/var/dendrite/jetstream" + - "${DENDRITE_SEARCH_INDEX_PATH:?}:/var/dendrite/searchindex" + depends_on: + postgres: + condition: service_healthy + networks: + - internal + restart: unless-stopped + +networks: + internal: + attachable: true \ No newline at end of file