version: '3' services: # DATASTORE SECTION datastore-reader: depends_on: - datastore-postgresql env_file: services.env networks: - backend - datastore-postgresql datastore-writer: depends_on: - datastore-postgresql - message-bus env_file: services.env networks: - backend - 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: 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 networks: - frontend - backend - message-bus # SHARED message-bus: image: redis:alpine networks: - message-bus # UPLINK haproxy: depends_on: - client - backend - autoupdate ports: - "8000:8000" networks: - uplink - frontend # 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 networks: uplink: frontend: internal: true backend: internal: true datastore-postgresql: internal: true message-bus: internal: true