docker-compose/dendrite/docker-compose.yml

46 lines
1.2 KiB
YAML

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.
- ${BASE_DATA_DIR}/dendrite/postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
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:
- ${BASE_DATA_DIR}/dendrite/config:/etc/dendrite
- ${BASE_DATA_DIR}/dendrite/media:/var/dendrite/media
- ${BASE_DATA_DIR}/dendrite/jetstream:/var/dendrite/jetstream
- ${BASE_DATA_DIR}/dendrite/search-index:/var/dendrite/searchindex
depends_on:
postgres:
condition: service_healthy
networks:
- internal
restart: unless-stopped
networks:
internal:
attachable: true