2020-02-13 10:01:33 +01:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
# DATASTORE SECTION
|
2020-05-07 11:59:22 +02:00
|
|
|
datastore-reader:
|
|
|
|
depends_on:
|
|
|
|
- datastore-postgresql
|
|
|
|
env_file: services.env
|
|
|
|
networks:
|
2020-06-10 13:58:26 +02:00
|
|
|
- backend
|
2020-05-07 11:59:22 +02:00
|
|
|
- datastore-postgresql
|
2020-02-13 10:01:33 +01:00
|
|
|
datastore-writer:
|
|
|
|
depends_on:
|
|
|
|
- datastore-postgresql
|
|
|
|
- message-bus
|
|
|
|
env_file: services.env
|
|
|
|
networks:
|
2020-06-10 13:58:26 +02:00
|
|
|
- backend
|
2020-02-13 10:01:33 +01:00
|
|
|
- datastore-postgresql
|
|
|
|
- message-bus
|
|
|
|
datastore-postgresql:
|
|
|
|
image: sameersbn/postgresql:10
|
|
|
|
labels:
|
|
|
|
org.openslides.role: "postgres"
|
|
|
|
environment:
|
|
|
|
- DB_USER=openslides
|
|
|
|
- DB_PASS=openslides
|
|
|
|
- DB_NAME=openslides
|
|
|
|
networks:
|
|
|
|
- datastore-postgresql
|
|
|
|
|
|
|
|
# CLIENT
|
|
|
|
client:
|
2020-06-10 13:58:26 +02:00
|
|
|
depends_on:
|
|
|
|
- backend
|
|
|
|
- autoupdate
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
|
|
|
|
# BACKEND
|
|
|
|
backend:
|
|
|
|
depends_on:
|
|
|
|
- datastore-reader
|
|
|
|
- datastore-writer
|
|
|
|
env_file: services.env
|
|
|
|
networks:
|
|
|
|
- frontend
|
|
|
|
- backend
|
|
|
|
|
|
|
|
# AUTOUPDATE
|
|
|
|
autoupdate:
|
|
|
|
depends_on:
|
|
|
|
- datastore-reader
|
|
|
|
- message-bus
|
|
|
|
env_file: services.env
|
2020-02-13 10:01:33 +01:00
|
|
|
networks:
|
2020-06-10 13:58:26 +02:00
|
|
|
- frontend
|
2020-02-13 10:01:33 +01:00
|
|
|
- backend
|
2020-06-10 13:58:26 +02:00
|
|
|
- message-bus
|
2020-02-13 10:01:33 +01:00
|
|
|
|
|
|
|
# SHARED
|
|
|
|
message-bus:
|
|
|
|
image: redis:alpine
|
|
|
|
networks:
|
|
|
|
- message-bus
|
|
|
|
|
|
|
|
# UPLINK
|
|
|
|
haproxy:
|
|
|
|
depends_on:
|
|
|
|
- client
|
2020-06-10 13:58:26 +02:00
|
|
|
- backend
|
|
|
|
- autoupdate
|
2020-02-13 10:01:33 +01:00
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
|
|
|
networks:
|
|
|
|
- uplink
|
2020-06-10 13:58:26 +02:00
|
|
|
- frontend
|
2020-02-13 10:01:33 +01:00
|
|
|
|
2020-06-10 13:58:26 +02:00
|
|
|
# Setup: host <-uplink-> haproxy <-frontend-> services that are reachable from the client <-backend-> services that are internal-only
|
|
|
|
# There are special networks for some services only, e.g. datastore-postgresql only for the postgresql, datastore reader and datastore writer
|
2020-02-13 10:01:33 +01:00
|
|
|
networks:
|
|
|
|
uplink:
|
2020-06-10 13:58:26 +02:00
|
|
|
frontend:
|
2020-02-13 10:01:33 +01:00
|
|
|
internal: true
|
|
|
|
backend:
|
|
|
|
internal: true
|
2020-06-10 13:58:26 +02:00
|
|
|
datastore-postgresql:
|
|
|
|
internal: true
|
|
|
|
message-bus:
|
|
|
|
internal: true
|