aboutsummaryrefslogtreecommitdiff
path: root/build/docker/docker-compose.polylith.yml
blob: 207d0451ab7609324cc892c85e91eb455d15a9fe (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
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

  jetstream:
    hostname: jetstream
    image: nats:latest
    command: |
      --jetstream
      --store_dir /var/lib/nats
      --cluster_name Dendrite
    volumes:
      # To persist your NATS JetStream streams outside of the Docker image,
      # prevent data loss, modify the following ./path_to path:
      - ./path_to/nats:/var/lib/nats
    networks:
      - internal

  client_api:
    hostname: client_api
    image: matrixdotorg/dendrite-polylith:latest
    command: clientapi
    volumes:
      - ./config:/etc/dendrite
    depends_on:
      - jetstream
      - postgres
    networks:
      - internal
    restart: unless-stopped

  media_api:
    hostname: media_api
    image: matrixdotorg/dendrite-polylith:latest
    command: mediaapi
    volumes:
      - ./config:/etc/dendrite
      - ./media:/var/dendrite/media
    networks:
      - internal
    restart: unless-stopped

  sync_api:
    hostname: sync_api
    image: matrixdotorg/dendrite-polylith:latest
    command: syncapi
    volumes:
      - ./config:/etc/dendrite
    depends_on:
      - jetstream
      - postgres
    networks:
      - internal
    restart: unless-stopped

  room_server:
    hostname: room_server
    image: matrixdotorg/dendrite-polylith:latest
    command: roomserver
    volumes:
      - ./config:/etc/dendrite
    depends_on:
      - jetstream
      - postgres
    networks:
      - internal
    restart: unless-stopped

  edu_server:
    hostname: edu_server
    image: matrixdotorg/dendrite-polylith:latest
    command: eduserver
    volumes:
      - ./config:/etc/dendrite
    depends_on:
      - jetstream
    networks:
      - internal
    restart: unless-stopped

  federation_api:
    hostname: federation_api
    image: matrixdotorg/dendrite-polylith:latest
    command: federationapi
    volumes:
      - ./config:/etc/dendrite
    depends_on:
      - jetstream
      - postgres
    networks:
      - internal
    restart: unless-stopped
      
  key_server:
    hostname: key_server
    image: matrixdotorg/dendrite-polylith:latest
    command: keyserver
    volumes:
      - ./config:/etc/dendrite
    depends_on:
      - jetstream
      - postgres
    networks:
      - internal
    restart: unless-stopped
      
  user_api:
    hostname: user_api
    image: matrixdotorg/dendrite-polylith:latest
    command: userapi
    volumes:
      - ./config:/etc/dendrite
    depends_on:
      - jetstream
      - postgres
    networks:
      - internal
    restart: unless-stopped

  appservice_api:
    hostname: appservice_api
    image: matrixdotorg/dendrite-polylith:latest
    command: appservice
    volumes:
      - ./config:/etc/dendrite
    networks:
      - internal
    depends_on:
      - jetstream
      - postgres
      - room_server
      - user_api
    restart: unless-stopped

networks:
  internal:
    attachable: true