2020-05-21 13:02:28 +01:00
|
|
|
version: "3.4"
|
|
|
|
services:
|
2020-10-27 13:58:58 +00:00
|
|
|
# PostgreSQL is needed for both polylith and monolith modes.
|
2020-05-21 13:02:28 +01:00
|
|
|
postgres:
|
|
|
|
hostname: postgres
|
2021-11-29 10:17:16 +00:00
|
|
|
image: postgres:14
|
2020-05-21 13:02:28 +01:00
|
|
|
restart: always
|
|
|
|
volumes:
|
2020-06-05 19:00:30 +01:00
|
|
|
- ./postgres/create_db.sh:/docker-entrypoint-initdb.d/20-create_db.sh
|
2020-10-13 09:54:07 +01:00
|
|
|
# To persist your PostgreSQL databases outside of the Docker image, to
|
|
|
|
# prevent data loss, you will need to add something like this:
|
|
|
|
# - ./path/to/persistent/storage:/var/lib/postgresql/data
|
2020-05-21 13:02:28 +01:00
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: itsasecret
|
|
|
|
POSTGRES_USER: dendrite
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
|
2020-10-27 13:58:58 +00:00
|
|
|
# Zookeeper is only needed for polylith mode!
|
2020-05-21 13:02:28 +01:00
|
|
|
zookeeper:
|
|
|
|
hostname: zookeeper
|
|
|
|
image: zookeeper
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
|
2020-10-27 13:58:58 +00:00
|
|
|
# Kafka is only needed for polylith mode!
|
2020-05-21 13:02:28 +01:00
|
|
|
kafka:
|
|
|
|
container_name: dendrite_kafka
|
|
|
|
hostname: kafka
|
|
|
|
image: wurstmeister/kafka
|
|
|
|
environment:
|
|
|
|
KAFKA_ADVERTISED_HOST_NAME: "kafka"
|
|
|
|
KAFKA_DELETE_TOPIC_ENABLE: "true"
|
|
|
|
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
|
|
|
|
depends_on:
|
|
|
|
- zookeeper
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
|
|
|
|
networks:
|
|
|
|
internal:
|
|
|
|
attachable: true
|