added reader to docker compose files

This commit is contained in:
Joshua Sangmeister 2020-05-07 11:59:22 +02:00
parent 1196d1052b
commit 46ecb24f59
4 changed files with 27 additions and 7 deletions

View File

@ -1,9 +1,16 @@
version: '3' version: '3'
services: 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: datastore-writer:
image: openslides-datastore-writer-dev image: openslides-datastore-writer-dev
volumes: volumes:
- ./openslides-datastore-service/shared/shared:/app/shared
- ./openslides-datastore-service/writer/writer:/app/writer - ./openslides-datastore-service/writer/writer:/app/writer
- ./cli:/app/cli
haproxy: haproxy:
image: openslides-haproxy-dev image: openslides-haproxy-dev
volumes: volumes:

View File

@ -2,10 +2,20 @@ version: '3'
services: services:
datastore-writer: datastore-writer:
build: build:
context: "https://github.com/OpenSlides/openslides-datastore-service.git#:writer" context: "https://github.com/OpenSlides/openslides-datastore-service.git"
args: args:
GIT_CHECKOUT: "${OPENSLIDES_DATASTORE_SERVICE_COMMIT_HASH}" GIT_CHECKOUT: "${OPENSLIDES_DATASTORE_SERVICE_COMMIT_HASH}"
MODULE: "writer"
PORT: "${OPENSLIDES_DATASTORE_WRITER_PORT}"
image: openslides-datastore-writer 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: client:
build: build:
context: "https://github.com/OpenSlides/openslides-client.git" context: "https://github.com/OpenSlides/openslides-client.git"

View File

@ -1,15 +1,16 @@
version: '3' version: '3'
services: services:
# DATASTORE SECTION # DATASTORE SECTION
datastore-reader:
depends_on:
- datastore-postgresql
env_file: services.env
networks:
- datastore-postgresql
datastore-writer: datastore-writer:
depends_on: depends_on:
- datastore-postgresql - datastore-postgresql
- message-bus - message-bus
environment:
- DATASTORE_DATABASE_HOST=datastore-postgresql
- DATASTORE_DATABASE_USER=openslides
- DATASTORE_DATABASE_PASSWORD=openslides
- DATASTORE_DATABASE_NAME=openslides
env_file: services.env env_file: services.env
networks: networks:
- datastore-postgresql - datastore-postgresql

View File

@ -2,3 +2,5 @@ MESSAGE_BUS_HOST=message-bus
MESSAGE_BUS_PORT=6379 MESSAGE_BUS_PORT=6379
DATASTORE_WRITER_HOST=datastore-writer DATASTORE_WRITER_HOST=datastore-writer
DATASTORE_WRITER_PORT=8000 DATASTORE_WRITER_PORT=8000
DATASTORE_WRITER_HOST=datastore-reader
DATASTORE_WRITER_PORT=8001