fix: new services

This commit is contained in:
Andras Bacsai
2024-10-07 11:54:54 +02:00
parent 1c10a43321
commit 7e32a37729
6 changed files with 57 additions and 39 deletions

View File

@@ -288,6 +288,31 @@ class Service extends BaseModel
continue; continue;
} }
switch ($image) { switch ($image) {
case $image->contains('label-studio'):
$data = collect([]);
$username = $this->environment_variables()->where('key', 'LABEL_STUDIO_USERNAME')->first();
$password = $this->environment_variables()->where('key', 'SERVICE_PASSWORD_LABELSTUDIO')->first();
if ($username) {
$data = $data->merge([
'Username' => [
'key' => 'LABEL_STUDIO_USERNAME',
'value' => data_get($username, 'value'),
'rules' => 'required',
],
]);
}
if ($password) {
$data = $data->merge([
'Password' => [
'key' => 'LABEL_STUDIO_PASSWORD',
'value' => data_get($password, 'value'),
'rules' => 'required',
'isPassword' => true,
],
]);
}
$fields->put('Label Studio', $data->toArray());
break;
case $image->contains('litellm'): case $image->contains('litellm'):
$data = collect([]); $data = collect([]);
$username = $this->environment_variables()->where('key', 'SERVICE_USER_UI')->first(); $username = $this->environment_variables()->where('key', 'SERVICE_USER_UI')->first();

View File

@@ -7,40 +7,41 @@
services: services:
labelstudio: labelstudio:
image: heartexlabs/label-studio:latest image: heartexlabs/label-studio:latest
restart: always
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
environment: environment:
- SERVICE_FQDN_LABELSTUDIO_8080 - SERVICE_FQDN_LABELSTUDIO_8080
- DJANGO_DB=default - DJANGO_DB=${DJANGO_DB:-default}
- POSTGRE_NAME=${POSTGRES_DB:-labelstudio} - POSTGRE_NAME=${POSTGRES_DB:-labelstudio}
- POSTGRE_USER=${SERVICE_USER_POSTGRES} - POSTGRE_USER=${SERVICE_USER_POSTGRES}
- POSTGRE_PASSWORD=${SERVICE_PASSWORD_POSTGRES} - POSTGRE_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
- POSTGRE_PORT=5432 - POSTGRE_PORT=5432
- POSTGRE_HOST=postgres - POSTGRE_HOST=postgres
- LABEL_STUDIO_HOST=${LABEL_STUDIO_HOST:-0.0.0.0} - LABEL_STUDIO_HOST=${SERVICE_FQDN_LABELSTUDIO}
- SSRF_PROTECTION_ENABLED=true - SSRF_PROTECTION_ENABLED=${SSRF_PROTECTION_ENABLED:-true}
- LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=${LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK:-true} - LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=${LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK:-true}
- DATA_UPLOAD_MAX_NUMBER_FILES=${DATA_UPLOAD_MAX_NUMBER_FILES:-10000} - DATA_UPLOAD_MAX_NUMBER_FILES=${DATA_UPLOAD_MAX_NUMBER_FILES:-10000}
- LABEL_STUDIO_USERNAME=${LABEL_STUDIO_USERNAME:-admin@example.com}
- LABEL_STUDIO_PASSWORD=${SERVICE_PASSWORD_LABELSTUDIO}
- LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=${LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK:-true}
volumes: volumes:
- labelstudio_data:/label-studio/data:rw - labelstudio-data:/label-studio/data
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
interval: 5s
timeout: 20s
retries: 3
postgres: postgres:
image: postgres:16-alpine image: postgres:16-alpine
restart: always
environment: environment:
- POSTGRES_USER=${SERVICE_USER_POSTGRES} - POSTGRES_USER=${SERVICE_USER_POSTGRES}
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES} - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
- POSTGRES_DB=${POSTGRES_DB:-labelstudio} - POSTGRES_DB=${POSTGRES_DB:-labelstudio}
volumes: volumes:
- pg_data:/var/lib/postgresql/data - pg-data:/var/lib/postgresql/data
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] test: ["CMD-SHELL", "pg_isready -h localhost -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s interval: 5s
timeout: 5s timeout: 20s
retries: 3 retries: 3
volumes:
pg_data:
labelstudio_data:

View File

@@ -16,6 +16,6 @@ services:
- ${PORT}:5672 - ${PORT}:5672
healthcheck: healthcheck:
test: rabbitmq-diagnostics -q ping test: rabbitmq-diagnostics -q ping
interval: 30s interval: 5s
timeout: 30s timeout: 30s
retries: 3 retries: 10

View File

@@ -4,8 +4,6 @@
# logo: svgs/unstructured.png # logo: svgs/unstructured.png
# port: 8000 # port: 8000
version: "3"
services: services:
unstructured: unstructured:
image: "downloads.unstructured.io/unstructured-io/unstructured-api:latest" image: "downloads.unstructured.io/unstructured-io/unstructured-api:latest"
@@ -17,8 +15,7 @@ services:
- CMD - CMD
- wget - wget
- "-qO-" - "-qO-"
- "--spider"
- "http://0.0.0.0:8000/healthcheck" - "http://0.0.0.0:8000/healthcheck"
interval: 15s interval: 5s
timeout: 15s timeout: 30s
retries: 3 retries: 10

View File

@@ -4,14 +4,12 @@
# logo: svgs/weaviate.png # logo: svgs/weaviate.png
# port: 8080 # port: 8080
version: "3"
services: services:
weaviate: weaviate:
image: "cr.weaviate.io/semitechnologies/weaviate:1.26.4" image: "cr.weaviate.io/semitechnologies/weaviate:1.26.4"
restart: always
volumes: volumes:
- "weaviate_data:/var/lib/weaviate" - "weaviate-data:/var/lib/weaviate"
command: command:
- "--host" - "--host"
- 0.0.0.0 - 0.0.0.0
@@ -21,20 +19,20 @@ services:
- http - http
environment: environment:
- SERVICE_FQDN_WEAVIATE_8080 - SERVICE_FQDN_WEAVIATE_8080
- DISABLE_TELEMETRY=true - DISABLE_TELEMETRY=${DISABLE_TELEMETRY:-true}
- QUERY_DEFAULTS_LIMIT=1000 - QUERY_DEFAULTS_LIMIT=${QUERY_DEFAULTS_LIMIT:-1000}
- LOG_LEVEL=info - LOG_LEVEL=${LOG_LEVEL:-info}
- GOMEMLIMIT=${GOMEMLIMIT:-1024MiB} - GOMEMLIMIT=${GOMEMLIMIT:-1024MiB}
- GOMAXPROCS=${GOMAXPROCS:-2} - GOMAXPROCS=${GOMAXPROCS:-2}
- AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=false - AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=${AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED:-false}
- AUTHORIZATION_ADMINLIST_USERS=${AUTHORIZATION_ADMINLIST_USERS:-admin@example.com} - AUTHORIZATION_ADMINLIST_USERS=${AUTHORIZATION_ADMINLIST_USERS:-admin@example.com}
- AUTHENTICATION_APIKEY_USERS=${AUTHENTICATION_APIKEY_USERS:-admin@example.com} - AUTHENTICATION_APIKEY_USERS=${AUTHENTICATION_APIKEY_USERS:-admin@example.com}
- AUTHENTICATION_APIKEY_ENABLED=true - AUTHENTICATION_APIKEY_ENABLED=${AUTHENTICATION_APIKEY_ENABLED:-true}
- "AUTHENTICATION_APIKEY_ALLOWED_KEYS=${SERVICE_PASSWORD_APIKEYS}" - AUTHENTICATION_APIKEY_ALLOWED_KEYS=${SERVICE_PASSWORD_APIKEYS}
- PERSISTENCE_DATA_PATH=/var/lib/weaviate - PERSISTENCE_DATA_PATH=/var/lib/weaviate
- DEFAULT_VECTORIZER_MODULE=none - DEFAULT_VECTORIZER_MODULE=${DEFAULT_VECTORIZER_MODULE:-none}
- ENABLE_MODULES=${ENABLE_MODULES:-text2vec-openai,generative-openai,qna-openai} - ENABLE_MODULES=${ENABLE_MODULES:-text2vec-openai,generative-openai,qna-openai}
- CLUSTER_HOSTNAME=node1 - CLUSTER_HOSTNAME=${CLUSTER_HOSTNAME:-node1}
healthcheck: healthcheck:
test: test:
- CMD - CMD
@@ -43,8 +41,5 @@ services:
- "--spider" - "--spider"
- "http://localhost:8080/v1/.well-known/ready" - "http://localhost:8080/v1/.well-known/ready"
interval: 5s interval: 5s
timeout: 5s timeout: 30s
retries: 3 retries: 10
volumes:
weaviate_data: null

File diff suppressed because one or more lines are too long