Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenFrankel committed Jun 5, 2024
2 parents 4718277 + f53bf6b commit 630ea07
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 52 deletions.
8 changes: 8 additions & 0 deletions config/.env.catalog → config/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ==== CATALOG ====
# Replace the Primary Issuer URI with your Auth0 URI and also the JWK_SET. Add the secondary if you have. If Secondary does not exists, please remove the lines 4 and 5 coresponding to SECONDARY.
CATALOG_AUTH_IDPS_PRIMARY_ISSUER_URI=${CATALOG_AUTH_IDPS_PRIMARY_ISSUER_URI:-https://identity.matatika.com/}
CATALOG_AUTH_IDPS_PRIMARY_JWK_SET_URI=${CATALOG_AUTH_IDPS_PRIMARY_JWK_SET_URI:-https://identity.matatika.com/.well-known/jwks.json}
Expand All @@ -13,3 +14,10 @@ OAUTH2_GOOGLE_CLIENT_SECRET=${OAUTH2_GOOGLE_CLIENT_SECRET:-}

# Define OPENAI_API_KEY to enable OpenAI question answering
OPENAI_API_KEY=${OPENAI_API_KEY:-}

# ==== APP ====
APP_IDENTITY_DOMAIN=${APP_IDENTITY_DOMAIN:-}
APP_IDENTITY_CLIENT_ID=${APP_IDENTITY_CLIENT_ID:-}
APP_IDENTITY_CONNECTION=${APP_IDENTITY_CONNECTION:-}

APP_OAUTH_GOOGLE_CLIENT_ID=${APP_OAUTH_GOOGLE_CLIENT_ID:-}
5 changes: 0 additions & 5 deletions config/.env.app

This file was deleted.

92 changes: 45 additions & 47 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
version: '3.7'
version: "3.7"

services:
catalog:
user: $userID:$groupID
image: matatika/catalog:22212
ports:
- '8080:8080'
- "8080:8080"
deploy:
resources:
reservations:
memory: 1g
limits:
memory: 3g
resources:
reservations:
memory: 1g
limits:
memory: 3g
tty: true
env_file: config/.env.catalog
env_file: config/.env
environment:
# Define DEVELOPMENT mode environments like debug settings etc
# ==== CATALOG ====
- ACTIVE_PROFILES=default,distribution
- "JAVA_OPTS=-XX:MaxDirectMemorySize=1G -XX:MaxMetaspaceSize=240234K -XX:ReservedCodeCacheSize=240M -Xss1M -Xms512m -Xmx1040584K"
- SPRING_H2_CONSOLE_ENABLED=false
Expand All @@ -24,45 +24,34 @@ services:
- PERSISTENCE_CATALOG_PASS=warehouse
- PERSISTENCE_CATALOG_DRIVER_CLASS_NAME=org.postgresql.Driver
- ELASTICSEARCH_HOST=search
# Define OAUTH2_GOOGLE_CLIENT_ID and OAUTH2_GOOGLE_CLIENT_SECRET to enable Google OAuth plugin settings (see config/.env.catalog)
#- OAUTH2_GOOGLE_CLIENT_ID=
#- OAUTH2_GOOGLE_CLIENT_SECRET=
# Define OPENAI_API_KEY to enable OpenAI question answering (see config/.env.catalog)
#- OPENAI_API_KEY=
# Define OAUTH2_GOOGLE_CLIENT_ID and OAUTH2_GOOGLE_CLIENT_SECRET to enable Google OAuth plugin settings (see config/.env)
# - OAUTH2_GOOGLE_CLIENT_ID=
# - OAUTH2_GOOGLE_CLIENT_SECRET=
# Define OPENAI_API_KEY to enable OpenAI question answering (see config/.env)
# - OPENAI_API_KEY=
- MATATIKA_WORKSPACES_HOME=/workspaces
- MATATIKA_PLUGINS_HOME=/plugins,/plugins-staging,file:/local-plugins
depends_on: {"search-setup": {"condition": "service_completed_successfully"}, "search": {"condition": "service_healthy"}, "db": {"condition": "service_healthy"}}
healthcheck:
test: curl -s http://localhost:8080/api/actuator/health | grep "UP" >/dev/null; if [[ $$? == 0 ]]; then echo 0; else echo 1; fi
interval: 30s
timeout: 10s
retries: 5
volumes:
- workspaces:/workspaces
- plugins:/local-plugins

app:
user: root
image: matatika/app:22212
ports:
- '3080:80'
- '3443:443'
tty: true
env_file: config/.env.app
environment:
# Define DEVELOPMENT mode environments like debug settings etc
# ==== APP ====
- REACT_APP_ENV=distribution
# Define APP_OAUTH_GOOGLE_CLIENT_ID to enable Google OAuth plugin settings
#- APP_OAUTH_GOOGLE_CLIENT_ID=
depends_on: {"catalog": {"condition": "service_healthy"}}
# - APP_OAUTH_GOOGLE_CLIENT_ID=
depends_on:
search-setup:
condition: service_completed_successfully
search:
condition: service_healthy
db:
condition: service_healthy
healthcheck:
test: curl -sI --insecure https://localhost:3443 | grep '200 OK' >/dev/null; if [[ $$? == 0 ]]; then echo 0; else echo 1; fi
interval: 30s
test: curl -fs http://localhost:8080/actuator/health | grep '^\{"status":"UP"' > /dev/null
interval: 10s
timeout: 10s
start_period: 60s
retries: 5
entrypoint: >
/bin/bash -c "
/app/docker-entrypoint.sh app"
volumes:
- workspaces:/workspaces
- plugins:/local-plugins

search:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
Expand All @@ -88,11 +77,14 @@ services:
ports:
- "9200:9200"
healthcheck:
test: curl --cacert config/certs/ca/ca.crt -s https://localhost:9200 >/dev/null; if [[ $$? == 52 ]]; then echo 0; else echo 1; fi
interval: 30s
test: curl -fs -u elastic:"$$ELASTIC_PASSWORD" --cacert config/certs/ca/ca.crt https://localhost:9200 > /dev/null
interval: 10s
timeout: 10s
start_period: 60s
retries: 5
depends_on: {"search-createcerts": {"condition": "service_completed_successfully"}}
depends_on:
search-createcerts:
condition: service_completed_successfully

# Short lived container that sets up elastic search
search-setup:
Expand All @@ -112,7 +104,9 @@ services:
volumes:
- ./orchestrate/matatika/elastic-search/config:/usr/share/elasticsearch/config/
- es-certs:/usr/share/elasticsearch/config/certs
depends_on: {"search": {"condition": "service_healthy"}}
depends_on:
search:
condition: service_healthy

# Short lived container that creates the certificates
search-createcerts:
Expand Down Expand Up @@ -157,7 +151,11 @@ services:
- ./orchestrate/matatika/elastic-logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
- ./orchestrate/matatika/elastic-logstash/pipeline:/usr/share/logstash/pipeline
- es-certs:/etc/certs
depends_on: {"search-setup": {"condition": "service_completed_successfully"}, "search": {"condition": "service_healthy"}}
depends_on:
search-setup:
condition: service_completed_successfully
search:
condition: service_healthy

db:
image: postgres:11
Expand All @@ -170,9 +168,9 @@ services:
expose:
- "5432"
ports:
- '5432:5432'
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U warehouse"]
test: pg_isready -U warehouse
interval: 10s
timeout: 5s
retries: 5
Expand Down

0 comments on commit 630ea07

Please sign in to comment.