From 46ecb24f59aaff192c9cfbc5dcc2dfdf14e86cb6 Mon Sep 17 00:00:00 2001 From: Joshua Sangmeister Date: Thu, 7 May 2020 11:59:22 +0200 Subject: [PATCH] added reader to docker compose files --- docker-compose.dev.yml | 7 +++++++ docker-compose.prod.yml | 12 +++++++++++- docker-compose.yml | 11 ++++++----- services.env | 4 +++- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 6e42ee728..b76412922 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,9 +1,16 @@ version: '3' services: + datastore-reader: + image: openslides-datastore-reader-dev + volumes: + - ./openslides-datastore-service/shared/shared:/app/shared + - ./openslides-datastore-service/reader/reader:/app/reader datastore-writer: image: openslides-datastore-writer-dev volumes: + - ./openslides-datastore-service/shared/shared:/app/shared - ./openslides-datastore-service/writer/writer:/app/writer + - ./cli:/app/cli haproxy: image: openslides-haproxy-dev volumes: diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 191c52ff4..38d6c9f4f 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -2,10 +2,20 @@ version: '3' services: datastore-writer: build: - context: "https://github.com/OpenSlides/openslides-datastore-service.git#:writer" + context: "https://github.com/OpenSlides/openslides-datastore-service.git" args: GIT_CHECKOUT: "${OPENSLIDES_DATASTORE_SERVICE_COMMIT_HASH}" + MODULE: "writer" + PORT: "${OPENSLIDES_DATASTORE_WRITER_PORT}" image: openslides-datastore-writer + datastore-reader: + build: + context: "https://github.com/OpenSlides/openslides-datastore-service.git" + args: + GIT_CHECKOUT: "${OPENSLIDES_DATASTORE_SERVICE_COMMIT_HASH}" + MODULE: "reader" + PORT: "${OPENSLIDES_DATASTORE_READER_PORT}" + image: openslides-datastore-reader client: build: context: "https://github.com/OpenSlides/openslides-client.git" diff --git a/docker-compose.yml b/docker-compose.yml index 8e18821ff..3a497c73e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,15 +1,16 @@ version: '3' services: # DATASTORE SECTION + datastore-reader: + depends_on: + - datastore-postgresql + env_file: services.env + networks: + - datastore-postgresql datastore-writer: depends_on: - datastore-postgresql - message-bus - environment: - - DATASTORE_DATABASE_HOST=datastore-postgresql - - DATASTORE_DATABASE_USER=openslides - - DATASTORE_DATABASE_PASSWORD=openslides - - DATASTORE_DATABASE_NAME=openslides env_file: services.env networks: - datastore-postgresql diff --git a/services.env b/services.env index 8ca0dbfbd..296145ebf 100644 --- a/services.env +++ b/services.env @@ -1,4 +1,6 @@ MESSAGE_BUS_HOST=message-bus MESSAGE_BUS_PORT=6379 DATASTORE_WRITER_HOST=datastore-writer -DATASTORE_WRITER_PORT=8000 \ No newline at end of file +DATASTORE_WRITER_PORT=8000 +DATASTORE_WRITER_HOST=datastore-reader +DATASTORE_WRITER_PORT=8001 \ No newline at end of file