aboutsummaryrefslogtreecommitdiff
path: root/build/docker/docker-compose.deps.yml
blob: aa06518896cf40f5b8a08f8cca6bb63ff7388505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: "3.4"
services:
  # PostgreSQL is needed for both polylith and monolith modes.
  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, you will need to add something like this:
    #  - ./path/to/persistent/storage:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: itsasecret
      POSTGRES_USER: dendrite
    networks:
      - internal

  # Zookeeper is only needed for polylith mode!
  zookeeper:
    hostname: zookeeper
    image: zookeeper
    networks:
      - internal

  # Kafka is only needed for polylith mode!
  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