Skip to content

Commit

Permalink
fix: one-click services
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Oct 4, 2024
1 parent 3b97bb1 commit 128d732
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 71 deletions.
23 changes: 11 additions & 12 deletions templates/compose/anythingllm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@ services:
environment:
- SERVICE_FQDN_ANYTHINGLLM_3001
- STORAGE_DIR=/app/server/storage
- DISABLE_TELEMETRY=true
- PASSWORDLOWERCASE=1
- PASSWORDMAXCHAR=250
- PASSWORDMINCHAR=6
- PASSWORDNUMERIC=1
- PASSWORDREQUIREMENTS=1
- PASSWORDSYMBOL=1
- PASSWORDUPPERCASE=1
- DISABLE_TELEMETRY=${DISABLE_TELEMETRY:-true}
- PASSWORDLOWERCASE=${PASSWORDLOWERCASE:-1}
- PASSWORDMAXCHAR=${PASSWORDMAXCHAR:-250}
- PASSWORDMINCHAR=${PASSWORDMINCHAR:-6}
- PASSWORDNUMERIC=${PASSWORDNUMERIC:-1}
- PASSWORDREQUIREMENTS=${PASSWORDREQUIREMENTS:-1}
- PASSWORDSYMBOL=${PASSWORDSYMBOL:-1}
- PASSWORDUPPERCASE=${PASSWORDUPPERCASE:-1}
- SIG_KEY=${SERVICE_PASSWORD_SIGKEY}
- SIG_SALT=${SERVICE_PASSWORD_SIGSALT}
- JWT_SECRET=${SERVICE_PASSWORD_JWTSECRET}
- AUTH_TOKEN=${SERVICE_PASSWORD_AUTHTOKEN}
- AUTH_TOKEN=${AUTH_TOKEN}
- SERVER_PORT=${SERVER_PORT:-3001}
cap_add:
- SYS_ADMIN
volumes:
- "anythingllm_storage:/app/server/storage"
- "anythingllm_hot:/app/collector/hotdir"
- "anythingllm_outputs:/app/collector/outputs"
- "anythingllm-storage:/app/server/storage"
- "anythingllm-hot:/app/collector/hotdir"
- "anythingllm-outputs:/app/collector/outputs"
user: "${UID:-1000}:${GID:-1000}"
72 changes: 31 additions & 41 deletions templates/compose/argilla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@
# logo: svgs/argilla.png
# port: 6900

version: "3"

services:
argilla:
image: "argilla/argilla-server:v2.2.0"
restart: always
environment:
- SERVICE_FQDN_ARGILLA_6900
- ARGILLA_HOME_PATH=/var/lib/argilla
- ARGILLA_ELASTICSEARCH=http://elasticsearch:9200
- ARGILLA_DATABASE_URL=postgresql+asyncpg://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB}
- ARGILLA_REDIS_URL=redis://redis:6379/0
- ARGILLA_AUTH_SECRET_KEY="${SERVICE_PASSWORD_AUTHSECRET}"
- ARGILLA_ENABLE_TELEMETRY=0
- HF_HUB_DISABLE_TELEMETRY=1
- REINDEX_DATASETS=1
- DEFAULT_USER_ENABLED=true
- ARGILLA_AUTH_SECRET_KEY=${SERVICE_PASSWORD_AUTHSECRET}
- ARGILLA_ENABLE_TELEMETRY=${ARGILLA_ENABLE_TELEMETRY:-0}
- HF_HUB_DISABLE_TELEMETRY=${HF_HUB_DISABLE_TELEMETRY:-1}
- REINDEX_DATASETS=${REINDEX_DATASETS:-1}
- DEFAULT_USER_ENABLED=${DEFAULT_USER_ENABLED:-true}
- USERNAME=${ARGILLA_USERNAME:-argilla}
- PASSWORD="${SERVICE_PASSWORD_ARGILLA}"
- API_KEY="${SERVICE_PASSWORD_APIKEY}"
- DEFAULT_USER_PASSWORD="${SERVICE_PASSWORD_ARGILLA}"
- DEFAULT_USER_API_KEY="${SERVICE_PASSWORD_APIKEY}"
- PASSWORD=${SERVICE_PASSWORD_ARGILLA}
- API_KEY=${SERVICE_PASSWORD_APIKEY}
- DEFAULT_USER_PASSWORD=${SERVICE_PASSWORD_ARGILLA}
- DEFAULT_USER_API_KEY=${SERVICE_PASSWORD_APIKEY}
- WORKSPACE=${WORKSPACE:-default}
depends_on:
elasticsearch:
condition: service_healthy
Expand All @@ -34,7 +32,7 @@ services:
postgres:
condition: service_healthy
volumes:
- "argilla_data:/var/lib/argilla"
- "argilla-data:/var/lib/argilla"
healthcheck:
test:
- CMD-SHELL
Expand All @@ -44,23 +42,23 @@ services:
retries: 5
worker:
image: "argilla/argilla-server:v2.2.0"
restart: always
environment:
- ARGILLA_HOME_PATH=/var/lib/argilla
- ARGILLA_ELASTICSEARCH=http://elasticsearch:9200
- ARGILLA_DATABASE_URL=postgresql+asyncpg://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB}
- ARGILLA_REDIS_URL=redis://redis:6379/0
- ARGILLA_AUTH_SECRET_KEY="${SERVICE_PASSWORD_AUTHSECRET}"
- ARGILLA_ENABLE_TELEMETRY=0
- HF_HUB_DISABLE_TELEMETRY=1
- REINDEX_DATASETS=1
- DEFAULT_USER_ENABLED=true
- ARGILLA_AUTH_SECRET_KEY=${SERVICE_PASSWORD_AUTHSECRET}
- ARGILLA_ENABLE_TELEMETRY=${ARGILLA_ENABLE_TELEMETRY:-0}
- HF_HUB_DISABLE_TELEMETRY=${HF_HUB_DISABLE_TELEMETRY:-1}
- REINDEX_DATASETS=${REINDEX_DATASETS:-1}
- DEFAULT_USER_ENABLED=${DEFAULT_USER_ENABLED:-true}
- USERNAME=${ARGILLA_USERNAME:-argilla}
- PASSWORD="${SERVICE_PASSWORD_ARGILLA}"
- API_KEY="${SERVICE_PASSWORD_APIKEY}"
- DEFAULT_USER_PASSWORD="${SERVICE_PASSWORD_ARGILLA}"
- DEFAULT_USER_API_KEY="${SERVICE_PASSWORD_APIKEY}"
- PASSWORD=${SERVICE_PASSWORD_ARGILLA}
- API_KEY=${SERVICE_PASSWORD_APIKEY}
- DEFAULT_USER_PASSWORD=${SERVICE_PASSWORD_ARGILLA}
- DEFAULT_USER_API_KEY=${SERVICE_PASSWORD_APIKEY}
- BACKGROUND_NUM_WORKERS=${BACKGROUND_NUM_WORKERS:-1}
- WORKSPACE=${WORKSPACE:-default}
depends_on:
elasticsearch:
condition: service_healthy
Expand All @@ -69,7 +67,7 @@ services:
postgres:
condition: service_healthy
volumes:
- "argilla_data:/var/lib/argilla"
- "argilla-data:/var/lib/argilla"
command: "sh -c 'python -m argilla_server worker --num-workers $${BACKGROUND_NUM_WORKERS}'"
healthcheck:
test:
Expand All @@ -80,13 +78,12 @@ services:
retries: 5
postgres:
image: "postgres:14"
restart: always
environment:
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
- POSTGRES_DB=${POSTGRES_DB:-argilla}
volumes:
- "pg_data:/var/lib/postgresql/data"
- "pg-data:/var/lib/postgresql/data"
healthcheck:
test:
- CMD-SHELL
Expand All @@ -96,9 +93,8 @@ services:
retries: 3
redis:
image: "redis:7"
restart: always
volumes:
- "redis_data:/data"
- "redis-data:/data"
healthcheck:
test:
- CMD-SHELL
Expand All @@ -108,29 +104,23 @@ services:
retries: 3
elasticsearch:
image: "docker.elastic.co/elasticsearch/elasticsearch:8.12.2"
restart: always
environment:
- node.name=elasticsearch
- cluster.name=es-argilla-local
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- cluster.routing.allocation.disk.threshold_enabled=false
- xpack.security.enabled=false
- node.name=${NODE_NAME:-elasticsearch}
- cluster.name=${CLUSTER_NAME:-es-argilla-local}
- discovery.type=${DISCOVERY_TYPE:-single-node}
- "ES_JAVA_OPTS=${ES_JAVA_OPTS:-\"-Xms512m -Xmx512m\"}"
- cluster.routing.allocation.disk.threshold_enabled=${CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED:-false}
- xpack.security.enabled=${XPACK_SECURITY_ENABLED:-false}
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- "elasticsearch_data:/usr/share/elasticsearch/data/"
- "elasticsearch-data:/usr/share/elasticsearch/data/"
healthcheck:
test:
- CMD-SHELL
- "curl --silent --fail http://elasticsearch:9200"
interval: 10s
timeout: 10s
retries: 5
volumes:
argilla_data: null
elastic_data: null
redis_data: null
pg_data: null
28 changes: 11 additions & 17 deletions templates/compose/infisical.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,14 @@
# logo: svgs/infisical.png
# port: 8080

version: "3"

services:
backend:
restart: always
depends_on:
redis:
condition: service_healthy
db-migration:
condition: service_completed_successfully
image: "infisical/infisical:latest-postgres"
environment:
- SERVICE_FQDN_BACKEND_8080
- SITE_URL=${SERVICE_FQDN_BACKEND_8080}
- NODE_ENV=production
- NODE_ENV=${NODE_ENV:-production}
- ENCRYPTION_KEY=${SERVICE_PASSWORD_ENCRYPTIONKEY}
- AUTH_SECRET=${SERVICE_REALBASE64_64_AUTHSECRET}
- DB_CONNECTION_URI=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@db:5432/${POSTGRES_DB}
Expand All @@ -27,23 +20,26 @@ services:
test:
- CMD-SHELL
- "wget --no-verbose --tries=1 --spider http://127.0.0.1:8080/api/status || exit 1"
depends_on:
redis:
condition: service_healthy
db-migration:
condition: service_completed_successfully
redis:
image: "redis:7"
volumes:
- redis-data:/data
environment:
- ALLOW_EMPTY_PASSWORD=yes
restart: always
- ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD:-yes}
healthcheck:
test:
- CMD-SHELL
- "redis-cli -h localhost -p 6379 ping"
interval: 5s
timeout: 5s
retries: 3
volumes:
- redis_data:/data
db:
image: "postgres:14-alpine"
restart: always
volumes:
- pg_data:/var/lib/postgresql/data
environment:
Expand All @@ -58,10 +54,11 @@ services:
timeout: 10s
retries: 10
db-migration:
exclude_from_hc: true
image: "infisical/infisical:latest-postgres"
depends_on:
db:
condition: service_healthy
image: "infisical/infisical:latest-postgres"
command: "npm run migration:latest"
restart: on-failure
environment:
Expand All @@ -70,6 +67,3 @@ services:
- POSTGRES_DB=${POSTGRES_DB:-infisical}
- DB_CONNECTION_URI=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@db:5432/${POSTGRES_DB:-infisical}
- REDIS_URL=redis://redis:6379
volumes:
pg_data:
redis_data:
2 changes: 1 addition & 1 deletion templates/service-templates.json

Large diffs are not rendered by default.

0 comments on commit 128d732

Please sign in to comment.