Adds submodule openslides-auth-service

This commit is contained in:
GabrielMeyer 2020-07-14 10:45:27 +02:00
parent 89f4323d11
commit 1f8e3d60e6
7 changed files with 196 additions and 146 deletions

4
.gitmodules vendored
View File

@ -13,3 +13,7 @@
[submodule "openslides-autoupdate-service"] [submodule "openslides-autoupdate-service"]
path = openslides-autoupdate-service path = openslides-autoupdate-service
url = git@github.com:OpenSlides/openslides-autoupdate-service.git url = git@github.com:OpenSlides/openslides-autoupdate-service.git
[submodule "openslides-auth-service"]
path = openslides-auth-service
url = git@github.com:OpenSlides/openslides-auth-service.git
branch = master

View File

@ -1,34 +1,38 @@
version: '3' version: "3"
services: services:
datastore-reader: datastore-reader:
image: openslides-datastore-reader-dev image: openslides-datastore-reader-dev
volumes: volumes:
- ./openslides-datastore-service/shared/shared:/app/shared - ./openslides-datastore-service/shared/shared:/app/shared
- ./openslides-datastore-service/reader/reader:/app/reader - ./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/shared/shared:/app/shared
- ./openslides-datastore-service/writer/writer:/app/writer - ./openslides-datastore-service/writer/writer:/app/writer
- ./openslides-datastore-service/cli:/app/cli - ./openslides-datastore-service/cli:/app/cli
environment: environment:
- DATASTORE_ENABLE_DEV_ENVIRONMENT=1 - DATASTORE_ENABLE_DEV_ENVIRONMENT=1
- COMMAND=create_initial_data - COMMAND=create_initial_data
- DATASTORE_INITIAL_DATA_FILE=https://raw.githubusercontent.com/OpenSlides/OpenSlides/openslides4-dev/docs/example-data.json - DATASTORE_INITIAL_DATA_FILE=https://raw.githubusercontent.com/OpenSlides/OpenSlides/openslides4-dev/docs/example-data.json
client: client:
image: openslides-client-dev image: openslides-client-dev
volumes: volumes:
- ./openslides-client/client/src:/app/src - ./openslides-client/client/src:/app/src
backend: backend:
image: openslides-backend-dev image: openslides-backend-dev
volumes: volumes:
- ./openslides-backend/openslides_backend:/srv/code/openslides_backend - ./openslides-backend/openslides_backend:/srv/code/openslides_backend
autoupdate: autoupdate:
image: openslides-autoupdate-dev image: openslides-autoupdate-dev
volumes: volumes:
- ./openslides-autoupdate-service/cmd:/root/cmd - ./openslides-autoupdate-service/cmd:/root/cmd
- ./openslides-autoupdate-service/internal:/root/internal - ./openslides-autoupdate-service/internal:/root/internal
haproxy: auth:
image: openslides-haproxy-dev image: openslides-auth-dev
volumes: volumes:
- ./haproxy/src:/usr/local/etc/haproxy - ./openslides-auth-service/auth:/app/auth
haproxy:
image: openslides-haproxy-dev
volumes:
- ./haproxy/src:/usr/local/etc/haproxy

View File

@ -1,74 +1,92 @@
version: '3' version: "3"
services: services:
datastore-reader: datastore-reader:
build: build:
context: "https://github.com/OpenSlides/openslides-datastore-service.git" 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: "reader" MODULE: "reader"
PORT: "${OPENSLIDES_DATASTORE_READER_PORT}" PORT: "${OPENSLIDES_DATASTORE_READER_PORT}"
image: openslides-datastore-reader image: openslides-datastore-reader
networks: networks:
- backend - backend
- datastore-postgresql - datastore-reader
- datastore-postgresql
datastore-writer: datastore-writer:
build: build:
context: "https://github.com/OpenSlides/openslides-datastore-service.git" 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" MODULE: "writer"
PORT: "${OPENSLIDES_DATASTORE_WRITER_PORT}" PORT: "${OPENSLIDES_DATASTORE_WRITER_PORT}"
image: openslides-datastore-writer image: openslides-datastore-writer
networks: networks:
- backend - backend
- datastore-postgresql - datastore-postgresql
- message-bus - message-bus
datastore-postgresql: datastore-postgresql:
networks: networks:
- datastore-postgresql - datastore-postgresql
client: client:
build: build:
context: "https://github.com/OpenSlides/openslides-client.git" context: "https://github.com/OpenSlides/openslides-client.git"
args: args:
GIT_CHECKOUT: "${OPENSLIDES_CLIENT_COMMIT_HASH}" GIT_CHECKOUT: "${OPENSLIDES_CLIENT_COMMIT_HASH}"
image: openslides-client image: openslides-client
networks: networks:
- frontend - frontend
backend: backend:
networks: networks:
- frontend - frontend
- backend - backend
autoupdate: autoupdate:
networks: networks:
- frontend - frontend
- backend - backend
- message-bus - message-bus
message-bus: auth:
networks: build:
- message-bus context: "https://github.com/OpenSlides/openslides-auth-service.git"
args:
GIT_CHECKOUT: "${OPENSLDIES_AUTH_SERVICE_COMMIT_HASH}"
PORT: "${OPENSLDIES_AUTH_SERVICE_PORT}"
image: openslides-auth
networks:
- datastore-reader
- auth
cache:
networks:
- auth
message-bus:
networks:
- message-bus
haproxy: haproxy:
build: ./haproxy build: ./haproxy
image: openslides-haproxy image: openslides-haproxy
networks: networks:
- uplink - uplink
- frontend - frontend
# Setup: host <-uplink-> haproxy <-frontend-> services that are reachable from the client <-backend-> services that are internal-only # 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 # There are special networks for some services only, e.g. datastore-postgresql only for the postgresql, datastore reader and datastore writer
networks: networks:
uplink: uplink:
frontend: frontend:
internal: true internal: true
backend: backend:
internal: true internal: true
datastore-postgresql: datastore-postgresql:
internal: true internal: true
message-bus: datastore-reader:
internal: true internal: true
message-bus:
internal: true
auth:
internal: true

View File

@ -1,55 +1,64 @@
version: '3' version: "3"
services: services:
# DATASTORE SECTION # DATASTORE SECTION
datastore-reader: datastore-reader:
depends_on: depends_on:
- datastore-postgresql - datastore-postgresql
env_file: services.env env_file: services.env
environment: environment:
- NUM_WORKERS=8 - NUM_WORKERS=8
datastore-writer: datastore-writer:
depends_on: depends_on:
- datastore-postgresql - datastore-postgresql
- message-bus - message-bus
env_file: services.env env_file: services.env
datastore-postgresql: datastore-postgresql:
image: sameersbn/postgresql:10 image: sameersbn/postgresql:10
labels: labels:
org.openslides.role: "postgres" org.openslides.role: "postgres"
environment: environment:
- DB_USER=openslides - DB_USER=openslides
- DB_PASS=openslides - DB_PASS=openslides
- DB_NAME=openslides - DB_NAME=openslides
# CLIENT # CLIENT
client: client:
depends_on: depends_on:
- backend - backend
- autoupdate - autoupdate
# BACKEND # BACKEND
backend: backend:
depends_on: depends_on:
- datastore-reader - datastore-reader
- datastore-writer - datastore-writer
env_file: services.env env_file: services.env
# AUTOUPDATE # AUTOUPDATE
autoupdate: autoupdate:
depends_on: depends_on:
- datastore-reader - datastore-reader
- message-bus - message-bus
env_file: services.env env_file: services.env
# SHARED # AUTH
message-bus: auth:
image: redis:alpine depends_on:
- datastore-reader
- cache
env_file: services.env
cache:
image: redis:alpine
# UPLINK # SHARED
haproxy: message-bus:
depends_on: image: redis:alpine
- client
- backend # UPLINK
- autoupdate haproxy:
ports: depends_on:
- "8000:8000" - client
- backend
- autoupdate
ports:
- "8000:8000"

View File

@ -16,6 +16,9 @@ frontend http
acl autoupdate path_beg -i /system/autoupdate acl autoupdate path_beg -i /system/autoupdate
use_backend backend_autoupdate if autoupdate use_backend backend_autoupdate if autoupdate
acl auth path_beg -i /system/auth
use_backend backend_auth if auth
stats enable stats enable
stats uri /stats stats uri /stats
stats refresh 10s stats refresh 10s
@ -41,3 +44,9 @@ backend backend_autoupdate
server autoupdate autoupdate:9012 resolvers docker_resolver check server autoupdate autoupdate:9012 resolvers docker_resolver check
timeout connect 60s timeout connect 60s
timeout server 60s timeout server 60s
backend backend_auth
mode http
server auth auth:9004 resolvers docker_resolver check
timeout connect 60s
timeout server 60s

@ -0,0 +1 @@
Subproject commit 7258d3f3b581d4dc57c2a25c656e5caa73dd03fc

View File

@ -12,3 +12,8 @@ ACTION_HOST=backend
ACTION_PORT=9002 ACTION_PORT=9002
PRESENTER_HOST=backend PRESENTER_HOST=backend
PRESENTER_PORT=9003 PRESENTER_PORT=9003
AUTH_HOST=auth
AUTH_PORT=9004
CACHE_HOST=cache
CACHE_PORT=6379