Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-182] Added elasticsearch prefix for indexes based on project name #212

Open
wants to merge 2 commits into
base: add-lilac-to-azure-pipeline
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions derex/runner/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ def mongodb_db_name(self) -> str:
def mongodb_user(self) -> str:
return self.config.get("mongodb_user", MONGODB_ROOT_USER)

@property
def elasticsearch_prefix(self) -> str:
return self.config.get("elasticsearch_prefix", f"{self.name}")

@property
def runmode(self) -> ProjectRunMode:
"""The run mode of this project, either debug or production.
Expand Down
1 change: 1 addition & 0 deletions derex/runner/templates/Dockerfile-project.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ENV MYSQL_PASSWORD={{ project.secret("mysql") }}
ENV MONGODB_DB_NAME={{ project.mongodb_db_name }}
ENV MONGODB_USER={{ project.mongodb_user }}
ENV MONGODB_PASSWORD={{ project.secret("mongodb") }}
ENV ELASTICSEARCH_PREFIX={{ project.elasticsearch_prefix }}
ENV DEREX_MINIO_SECRET={{ project.secret("minio") }}
{%- for key, value in project.get_container_env().items() %}
ENV {{ key }}={{ value | tojson }}
Expand Down
1 change: 1 addition & 0 deletions derex/runner/templates/docker-compose-project.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ x-common:
MONGODB_DB_NAME: {{ project.mongodb_db_name }}
MONGODB_USER: {{ project.mongodb_user }}
MONGODB_PASSWORD: {{ project.secret("mongodb") }}
ELASTICSEARCH_PREFIX: {{ project.elasticsearch_prefix }}
DEREX_MINIO_SECRET: {{ project.secret("minio") }}
{%- for key, value in project.get_container_env().items() %}
{{ key }}: {{ value | tojson }}
Expand Down
Loading