-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #467 from uhh-lt/improve-configurations
Improve configurations
- Loading branch information
Showing
12 changed files
with
154 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
if [ ! -d ".git" ]; then | ||
echo "This script must be run from the root directory of the project." | ||
exit 1 | ||
fi | ||
|
||
while [[ "$#" -gt 0 ]]; do | ||
case $1 in | ||
--project_name) PROJECT_NAME="$2"; shift ;; | ||
--port_prefix) PORT_PREFIX="$2"; shift ;; | ||
--help) | ||
echo "Usage: $0 --project_name <name> --port_prefix <prefix>" | ||
echo " --project_name The name of the project." | ||
echo " --port_prefix The port prefix to use." | ||
echo " --help Display this help message." | ||
exit 0 | ||
;; | ||
*) echo "Unknown parameter passed: $1"; exit 1 ;; | ||
esac | ||
shift | ||
done | ||
|
||
if [ -z "$PROJECT_NAME" ] || [ -z "$PORT_PREFIX" ]; then | ||
echo "--project_name and --port_prefix parameters are required." | ||
exit 1 | ||
fi | ||
|
||
JWT_SECRET=$(pwgen 32 1) | ||
REPO_ROOT="$(pwd)/docker/backend_repo" | ||
|
||
cp docker/.env.example docker/.env | ||
cp backend/.env.example backend/.env | ||
cp frontend/.env.development.example frontend/.env.development | ||
cp frontend/.env.production.example frontend/.env.production | ||
|
||
# setup docker .env file | ||
sed -i "s/COMPOSE_PROJECT_NAME=demo/COMPOSE_PROJECT_NAME=${PROJECT_NAME}/" docker/.env | ||
sed -i "s/131/${PORT_PREFIX}/g" docker/.env | ||
sed -i "s/JWT_SECRET=/JWT_SECRET=${JWT_SECRET}/" docker/.env | ||
sed -i "s/UID=121/UID=$(id -u)/" docker/.env | ||
sed -i "s/GID=126/GID=$(id -g)/" docker/.env | ||
|
||
# setup backend .env file | ||
sed -i "s/131/${PORT_PREFIX}/g" backend/.env | ||
sed -i "s/JWT_SECRET=/JWT_SECRET=${JWT_SECRET}/" backend/.env | ||
sed -i "s|REPO_ROOT=/insert_path_to_dats_repo/docker/backend_repo|REPO_ROOT=${REPO_ROOT}|" backend/.env | ||
|
||
# setup frontend .env file | ||
sed -i "s/131/${PORT_PREFIX}/g" frontend/.env.development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
services: | ||
postgres: | ||
ports: | ||
- "${POSTGRES_EXPOSED:-13122}:5432" | ||
|
||
rabbitmq: | ||
ports: | ||
- "${RABBIT_EXPOSED:-13123}:5672" | ||
|
||
redis: | ||
ports: | ||
- "${REDIS_EXPOSED:-13124}:6379" | ||
|
||
weaviate: | ||
ports: | ||
- "${WEAVIATE_EXPOSED:-13132}:8080" | ||
|
||
elasticsearch: | ||
ports: | ||
- "${ELASTICSEARCH_EXPOSED:-13125}:9200" | ||
|
||
kibana: | ||
image: docker.elastic.co/kibana/kibana:8.11.1 | ||
healthcheck: | ||
test: ["CMD-SHELL", "curl -f http://localhost:5601 || exit 1"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
environment: | ||
ELASTICSEARCH_URL: http://elasticsearch:9200 | ||
ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]' | ||
ports: | ||
- "${KIBANA_EXPOSED:-13126}:5601" | ||
networks: | ||
- dats_demo_network | ||
depends_on: | ||
elasticsearch: | ||
condition: service_healthy | ||
restart: true | ||
|
||
lighttpd: | ||
image: sebp/lighttpd | ||
volumes: | ||
- ./backend_repo:/var/www/localhost/htdocs | ||
tty: true | ||
ports: | ||
- "${CONTENT_SERVER_EXPOSED:-13121}:80" | ||
networks: | ||
- dats_demo_network | ||
|
||
ray: | ||
ports: | ||
- "${RAY_API_EXPOSED:-13130}:8000" | ||
- "${RAY_DASHBOARD_EXPOSED:-13131}:8265" | ||
|
||
celery-background-jobs-worker: | ||
environment: | ||
INSTALL_JUPYTER: ${CELERY_INSTALL_JUPYTER:-false} | ||
CELERY_DEBUG_MODE: ${CELERY_DEBUG_MODE:-0} | ||
ports: | ||
- "${JUPYTER_CELERY_EXPOSED:-13129}:8888" | ||
- "${CELERY_DEBUG_PORT:-45678}:6900" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
services: | ||
elasticsearch: | ||
environment: | ||
- xpack.security.enabled=false # no auth | ||
- discovery.type=single-node # single node cluster | ||
- ES_JAVA_OPTS=-Xms8g -Xmx8g | ||
|
||
ray: | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
device_ids: ["0"] # use first gpu for production | ||
capabilities: [gpu] |
Oops, something went wrong.