Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a53604c86a | |||
| 670a1b25f5 | |||
| 0eb7026d68 | |||
| 47b8484634 | |||
| cf802e3fb7 | |||
| cd84ec10db | |||
| 51fa49051a | |||
| f8ed764e30 | |||
| 98ba6137bb | |||
| 74e1617461 | |||
| 523dcf8ee4 | |||
| 2390bd7a9a | |||
| ce762541cb | |||
| 3e44e34608 | |||
| f683cb980a | |||
| fd0fc6189f | |||
| 5d172bcc4c | |||
| 9eba60f0e5 | |||
| 02d84ebd08 | |||
| 6f49ff0cd7 | |||
| f9a17e30ec | |||
| 17ee6b0369 | |||
| 5b16e97e92 | |||
| e8cc0b6eab | |||
| 9307c795d1 | |||
| 90b2d39531 | |||
| cfb9cdb2a1 | |||
| d0d8e7f909 | |||
| b95cb05a3b | |||
| 4fddf5ded1 | |||
| b0c61fdc67 |
@@ -97,6 +97,9 @@ CSRF_COOKIE_SECURE = CommonUtils.str_to_bool(
|
||||
os.environ.get("CSRF_COOKIE_SECURE", "False")
|
||||
)
|
||||
|
||||
# Trust X-Forwarded-Proto header from reverse proxy (Cloudflare Tunnel/Traefik)
|
||||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||
|
||||
PATH_PREFIX = os.environ.get("PATH_PREFIX", "api/v1").strip("/")
|
||||
# Resetting the path prefix will require reconfiguring all existing deployed APIs
|
||||
API_DEPLOYMENT_PATH_PREFIX = os.environ.get(
|
||||
|
||||
188
docker/docker-compose-dev-essentials.host.yaml
Normal file
188
docker/docker-compose-dev-essentials.host.yaml
Normal file
@@ -0,0 +1,188 @@
|
||||
x-essentials-env: &essentials_env
|
||||
POSTGRES_USER: "unstract_dev"
|
||||
POSTGRES_PASSWORD: "unstract_pass"
|
||||
POSTGRES_DB: "unstract_db"
|
||||
POSTGRES_SCHEMA: "unstract"
|
||||
MINIO_ROOT_USER: "minio"
|
||||
MINIO_ROOT_PASSWORD: "minio123"
|
||||
MINIO_ACCESS_KEY: "minio"
|
||||
MINIO_SECRET_KEY: "minio123"
|
||||
FLIPT_DB_URL: "postgres://unstract_dev:unstract_pass@unstract-db:5432/unstract_db?sslmode=disable"
|
||||
QDRANT_USER: "unstract_vector_dev"
|
||||
QDRANT_PASS: "unstract_vector_pass"
|
||||
QDRANT_DB: "unstract_vector_db"
|
||||
RABBITMQ_DEFAULT_USER: "admin"
|
||||
RABBITMQ_DEFAULT_PASS: "password"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: "pgvector/pgvector:pg15"
|
||||
container_name: unstract-db
|
||||
restart: unless-stopped
|
||||
# set shared memory limit when using docker-compose
|
||||
shm_size: 128mb
|
||||
expose:
|
||||
- "5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data/
|
||||
- /home/trav/apps/unstract/docker/scripts/db-setup/db_setup.sh:/docker-entrypoint-initdb.d/db_setup.sh
|
||||
environment:
|
||||
<<: *essentials_env
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
redis:
|
||||
image: "redis:7.2.3"
|
||||
container_name: unstract-redis
|
||||
restart: unless-stopped
|
||||
# uncomment below command if persistance required.
|
||||
#command: redis-server --save 20 1 --loglevel warning --
|
||||
expose:
|
||||
- "6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
minio:
|
||||
image: "minio/minio:latest"
|
||||
container_name: unstract-minio
|
||||
hostname: minio
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "9000"
|
||||
- "9001"
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
environment:
|
||||
<<: *essentials_env
|
||||
command: server /data --console-address ":9001"
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.minio.rule=Host(`minio-unstract.toy`)
|
||||
- traefik.http.services.minio.loadbalancer.server.port=9001
|
||||
|
||||
minio-bootstrap:
|
||||
image: minio/mc
|
||||
depends_on:
|
||||
- minio
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
sleep 5;
|
||||
mc alias set minio http://unstract-minio:9000 minio minio123;
|
||||
mc mb minio/unstract;
|
||||
mc mirror /app/prompt-studio-data minio/unstract/prompt-studio-data;
|
||||
exit 0;
|
||||
"
|
||||
volumes:
|
||||
- prompt_studio_data:/app/prompt-studio-data
|
||||
|
||||
# reverse-proxy:
|
||||
# # The official v2 Traefik docker image
|
||||
# image: traefik:v2.10
|
||||
# container_name: unstract-proxy
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - little_tunnel
|
||||
# # - Enables the web UI.
|
||||
# # - Tells Traefik to use docker and file providers.
|
||||
# # - Direct Traefik to the correct network for docker provider.
|
||||
# # This is required because Traefik by default tries available networks in a
|
||||
# # round-robin fashion. With multiple providers, services can be on multiple
|
||||
# # networks causing 504 Gateway Timeout.
|
||||
# command: --api.insecure=true
|
||||
# --accesslog=true --log.level=INFO
|
||||
# --providers.docker=true --providers.docker.network=unstract-network
|
||||
# --providers.file.filename=/proxy_overrides.yaml --providers.file.watch=true
|
||||
# expose:
|
||||
# # The HTTP port
|
||||
# - "80"
|
||||
# # The Web UI (enabled by --api.insecure=true)
|
||||
# - "8080"
|
||||
# volumes:
|
||||
# # So that Traefik can listen to the Docker events
|
||||
# - /var/run/docker.sock:/var/run/docker.sock
|
||||
# # Proxy overrides for components run directly in Docker host
|
||||
# - /home/trav/apps/unstract/docker/proxy_overrides.yaml:/proxy_overrides.yaml
|
||||
# # Since any proxy overrides need to point to Docker host for relevant routes.
|
||||
# extra_hosts:
|
||||
# # "host-gateway" is a special string that translates to host docker0 i/f IP.
|
||||
# - "host.docker.internal:host-gateway"
|
||||
|
||||
feature-flag:
|
||||
image: flipt/flipt:v1.34.0 # Dated(05/01/2024) Latest stable version. Ref:https://github.com/flipt-io/flipt/releases
|
||||
container_name: unstract-flipt
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
# ports: # Forwarded to available host ports
|
||||
# - "8082:8080" # REST API port
|
||||
# - "9005:9000" # gRPC port
|
||||
ports: # Forwarded to available host ports
|
||||
- "8080" # REST API port
|
||||
- "9000" # gRPC port
|
||||
# https://www.flipt.io/docs/configuration/overview#environment-variables)
|
||||
# https://www.flipt.io/docs/configuration/overview#configuration-parameters
|
||||
environment:
|
||||
<<: *essentials_env
|
||||
FLIPT_CACHE_ENABLED: "true"
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.feature-flag.rule=Host(`flag.unstract.toy`)
|
||||
- traefik.http.services.feature-flag.loadbalancer.server.port=8080
|
||||
|
||||
unstructured-io:
|
||||
profiles:
|
||||
- optional
|
||||
image: downloads.unstructured.io/unstructured-io/unstructured-api:0.0.61
|
||||
container_name: unstract-unstructured-io
|
||||
restart: unless-stopped
|
||||
# ports: # Forwarded to available host ports
|
||||
# - "8083:8000"
|
||||
expose: # Forwarded to available host ports
|
||||
- "8000"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
qdrant:
|
||||
# Vector DB for doc indexer
|
||||
image: "qdrant/qdrant:v1.8.3"
|
||||
container_name: unstract-vector-db
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "6333"
|
||||
volumes:
|
||||
- qdrant_data:/var/lib/qdrant/data/
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
environment:
|
||||
<<: *essentials_env
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:4.1.0-management
|
||||
container_name: unstract-rabbitmq
|
||||
hostname: unstract-rabbit
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
<<: *essentials_env
|
||||
# ports:
|
||||
# - "5672:5672" # AMQP port
|
||||
# - "15672:15672" # Management UI port
|
||||
expose:
|
||||
- "5672" # AMQP port
|
||||
- "15672" # Management UI port
|
||||
volumes:
|
||||
- rabbitmq_data:/var/lib/rabbitmq
|
||||
|
||||
volumes:
|
||||
flipt_data:
|
||||
minio_data:
|
||||
postgres_data:
|
||||
qdrant_data:
|
||||
redis_data:
|
||||
prompt_studio_data:
|
||||
rabbitmq_data:
|
||||
|
||||
networks:
|
||||
little_tunnel:
|
||||
external: true
|
||||
168
docker/docker-compose-dev-essentials.host.yaml.bk
Normal file
168
docker/docker-compose-dev-essentials.host.yaml.bk
Normal file
@@ -0,0 +1,168 @@
|
||||
services:
|
||||
db:
|
||||
image: "pgvector/pgvector:pg15"
|
||||
container_name: unstract-db
|
||||
restart: unless-stopped
|
||||
# set shared memory limit when using docker-compose
|
||||
shm_size: 128mb
|
||||
expose:
|
||||
- "5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data/
|
||||
- /home/trav/apps/unstract/docker/scripts/db-setup/db_setup.sh:/docker-entrypoint-initdb.d/db_setup.sh
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
redis:
|
||||
image: "redis:7.2.3"
|
||||
container_name: unstract-redis
|
||||
restart: unless-stopped
|
||||
# uncomment below command if persistance required.
|
||||
#command: redis-server --save 20 1 --loglevel warning --
|
||||
expose:
|
||||
- "6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
minio:
|
||||
image: "minio/minio:latest"
|
||||
container_name: unstract-minio
|
||||
hostname: minio
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "9000"
|
||||
- "9001"
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
command: server /data --console-address ":9001"
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.minio.rule=Host(`minio-unstract.toy`)
|
||||
- traefik.http.services.minio.loadbalancer.server.port=9001
|
||||
|
||||
minio-bootstrap:
|
||||
image: minio/mc
|
||||
depends_on:
|
||||
- minio
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
sleep 5;
|
||||
mc alias set minio http://unstract-minio:9000 minio minio123;
|
||||
mc mb minio/unstract;
|
||||
mc mirror /app/prompt-studio-data minio/unstract/prompt-studio-data;
|
||||
exit 0;
|
||||
"
|
||||
volumes:
|
||||
- prompt_studio_data:/app/prompt-studio-data
|
||||
|
||||
reverse-proxy:
|
||||
# The official v2 Traefik docker image
|
||||
image: traefik:v2.10
|
||||
container_name: unstract-proxy
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- little_tunnel
|
||||
# - Enables the web UI.
|
||||
# - Tells Traefik to use docker and file providers.
|
||||
# - Direct Traefik to the correct network for docker provider.
|
||||
# This is required because Traefik by default tries available networks in a
|
||||
# round-robin fashion. With multiple providers, services can be on multiple
|
||||
# networks causing 504 Gateway Timeout.
|
||||
command: --api.insecure=true
|
||||
--accesslog=true --log.level=INFO
|
||||
--providers.docker=true --providers.docker.network=unstract-network
|
||||
--providers.file.filename=/proxy_overrides.yaml --providers.file.watch=true
|
||||
expose:
|
||||
# The HTTP port
|
||||
- "80"
|
||||
# The Web UI (enabled by --api.insecure=true)
|
||||
- "8080"
|
||||
volumes:
|
||||
# So that Traefik can listen to the Docker events
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# Proxy overrides for components run directly in Docker host
|
||||
- /home/trav/apps/unstract/docker/proxy_overrides.yaml:/proxy_overrides.yaml
|
||||
# Since any proxy overrides need to point to Docker host for relevant routes.
|
||||
extra_hosts:
|
||||
# "host-gateway" is a special string that translates to host docker0 i/f IP.
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
feature-flag:
|
||||
image: flipt/flipt:v1.34.0 # Dated(05/01/2024) Latest stable version. Ref:https://github.com/flipt-io/flipt/releases
|
||||
container_name: unstract-flipt
|
||||
restart: unless-stopped
|
||||
ports: # Forwarded to available host ports
|
||||
- "8082:8080" # REST API port
|
||||
- "9005:9000" # gRPC port
|
||||
# https://www.flipt.io/docs/configuration/overview#environment-variables)
|
||||
# https://www.flipt.io/docs/configuration/overview#configuration-parameters
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
environment:
|
||||
FLIPT_CACHE_ENABLED: true
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.feature-flag.rule=Host(`flag.unstract.toy`)
|
||||
- traefik.http.services.feature-flag.loadbalancer.server.port=8080
|
||||
|
||||
unstructured-io:
|
||||
profiles:
|
||||
- optional
|
||||
image: downloads.unstructured.io/unstructured-io/unstructured-api:0.0.61
|
||||
container_name: unstract-unstructured-io
|
||||
restart: unless-stopped
|
||||
# ports: # Forwarded to available host ports
|
||||
# - "8083:8000"
|
||||
expose: # Forwarded to available host ports
|
||||
- "8000"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
qdrant:
|
||||
# Vector DB for doc indexer
|
||||
image: "qdrant/qdrant:v1.8.3"
|
||||
container_name: unstract-vector-db
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "6333"
|
||||
volumes:
|
||||
- qdrant_data:/var/lib/qdrant/data/
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:4.1.0-management
|
||||
container_name: unstract-rabbitmq
|
||||
hostname: unstract-rabbit
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
# ports:
|
||||
# - "5672:5672" # AMQP port
|
||||
# - "15672:15672" # Management UI port
|
||||
expose:
|
||||
- "5672" # AMQP port
|
||||
- "15672" # Management UI port
|
||||
volumes:
|
||||
- rabbitmq_data:/var/lib/rabbitmq
|
||||
|
||||
volumes:
|
||||
flipt_data:
|
||||
minio_data:
|
||||
postgres_data:
|
||||
qdrant_data:
|
||||
redis_data:
|
||||
prompt_studio_data:
|
||||
rabbitmq_data:
|
||||
|
||||
networks:
|
||||
little_tunnel:
|
||||
external: true
|
||||
@@ -1,157 +1,158 @@
|
||||
services:
|
||||
db:
|
||||
image: "pgvector/pgvector:pg15"
|
||||
container_name: unstract-db
|
||||
restart: unless-stopped
|
||||
# set shared memory limit when using docker-compose
|
||||
shm_size: 128mb
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data/
|
||||
- ./scripts/db-setup/db_setup.sh:/docker-entrypoint-initdb.d/db_setup.sh
|
||||
env_file:
|
||||
- ./essentials.env
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
db:
|
||||
image: "pgvector/pgvector:pg15"
|
||||
container_name: unstract-db
|
||||
restart: unless-stopped
|
||||
# set shared memory limit when using docker-compose
|
||||
shm_size: 128mb
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data/
|
||||
- ./scripts/db-setup/db_setup.sh:/docker-entrypoint-initdb.d/db_setup.sh
|
||||
env_file:
|
||||
- ./essentials.env
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
redis:
|
||||
image: "redis:7.2.3"
|
||||
container_name: unstract-redis
|
||||
restart: unless-stopped
|
||||
# uncomment below command if persistance required.
|
||||
#command: redis-server --save 20 1 --loglevel warning --
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
redis:
|
||||
image: "redis:7.2.3"
|
||||
container_name: unstract-redis
|
||||
restart: unless-stopped
|
||||
# uncomment below command if persistance required.
|
||||
#command: redis-server --save 20 1 --loglevel warning --
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
minio:
|
||||
image: "minio/minio:latest"
|
||||
container_name: unstract-minio
|
||||
hostname: minio
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
env_file:
|
||||
- ./essentials.env
|
||||
command: server /data --console-address ":9001"
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.minio.rule=Host(`minio.unstract.localhost`)
|
||||
- traefik.http.services.minio.loadbalancer.server.port=9001
|
||||
minio:
|
||||
image: "minio/minio:latest"
|
||||
container_name: unstract-minio
|
||||
hostname: minio
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
env_file:
|
||||
- ./essentials.env
|
||||
command: server /data --console-address ":9001"
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.minio.rule=Host(`minio.unstract.localhost`)
|
||||
- traefik.http.services.minio.loadbalancer.server.port=9001
|
||||
|
||||
minio-bootstrap:
|
||||
image: minio/mc
|
||||
depends_on:
|
||||
- minio
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
sleep 5;
|
||||
mc alias set minio http://unstract-minio:9000 minio minio123;
|
||||
mc mb minio/unstract;
|
||||
mc mirror /app/prompt-studio-data minio/unstract/prompt-studio-data;
|
||||
exit 0;
|
||||
"
|
||||
volumes:
|
||||
- prompt_studio_data:/app/prompt-studio-data
|
||||
minio-bootstrap:
|
||||
image: minio/mc
|
||||
depends_on:
|
||||
- minio
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
sleep 5;
|
||||
mc alias set minio http://unstract-minio:9000 minio minio123;
|
||||
mc mb minio/unstract;
|
||||
mc mirror /app/prompt-studio-data minio/unstract/prompt-studio-data;
|
||||
exit 0;
|
||||
"
|
||||
volumes:
|
||||
- prompt_studio_data:/app/prompt-studio-data
|
||||
|
||||
reverse-proxy:
|
||||
# The official v2 Traefik docker image
|
||||
image: traefik:v2.10
|
||||
container_name: unstract-proxy
|
||||
restart: unless-stopped
|
||||
# - Enables the web UI.
|
||||
# - Tells Traefik to use docker and file providers.
|
||||
# - Direct Traefik to the correct network for docker provider.
|
||||
# This is required because Traefik by default tries available networks in a
|
||||
# round-robin fashion. With multiple providers, services can be on multiple
|
||||
# networks causing 504 Gateway Timeout.
|
||||
command: --api.insecure=true
|
||||
--accesslog=true --log.level=INFO
|
||||
--providers.docker=true --providers.docker.network=unstract-network
|
||||
--providers.file.filename=/proxy_overrides.yaml --providers.file.watch=true
|
||||
ports:
|
||||
# The HTTP port
|
||||
- "80:80"
|
||||
# The Web UI (enabled by --api.insecure=true)
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
# So that Traefik can listen to the Docker events
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# Proxy overrides for components run directly in Docker host
|
||||
- ./proxy_overrides.yaml:/proxy_overrides.yaml
|
||||
# Since any proxy overrides need to point to Docker host for relevant routes.
|
||||
extra_hosts:
|
||||
# "host-gateway" is a special string that translates to host docker0 i/f IP.
|
||||
- "host.docker.internal:host-gateway"
|
||||
reverse-proxy:
|
||||
# The official v2 Traefik docker image
|
||||
image: traefik:v2.10
|
||||
container_name: unstract-proxy
|
||||
restart: unless-stopped
|
||||
# - Enables the web UI.
|
||||
# - Tells Traefik to use docker and file providers.
|
||||
# - Direct Traefik to the correct network for docker provider.
|
||||
# This is required because Traefik by default tries available networks in a
|
||||
# round-robin fashion. With multiple providers, services can be on multiple
|
||||
# networks causing 504 Gateway Timeout.
|
||||
command: --api.insecure=true
|
||||
--accesslog=true --log.level=INFO
|
||||
--providers.docker=true --providers.docker.network=unstract-network
|
||||
--providers.file.filename=/proxy_overrides.yaml --providers.file.watch=true
|
||||
ports:
|
||||
# The HTTP port
|
||||
- "80:80"
|
||||
# The Web UI (enabled by --api.insecure=true)
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
# So that Traefik can listen to the Docker events
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# Proxy overrides for components run directly in Docker host
|
||||
- ./proxy_overrides.yaml:/proxy_overrides.yaml
|
||||
# Since any proxy overrides need to point to Docker host for relevant routes.
|
||||
extra_hosts:
|
||||
# "host-gateway" is a special string that translates to host docker0 i/f IP.
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
feature-flag:
|
||||
image: flipt/flipt:v1.34.0 # Dated(05/01/2024) Latest stable version. Ref:https://github.com/flipt-io/flipt/releases
|
||||
container_name: unstract-flipt
|
||||
restart: unless-stopped
|
||||
ports: # Forwarded to available host ports
|
||||
- "8082:8080" # REST API port
|
||||
- "9005:9000" # gRPC port
|
||||
# https://www.flipt.io/docs/configuration/overview#environment-variables)
|
||||
# https://www.flipt.io/docs/configuration/overview#configuration-parameters
|
||||
env_file:
|
||||
- ./essentials.env
|
||||
environment:
|
||||
FLIPT_CACHE_ENABLED: true
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.feature-flag.rule=Host(`feature-flag.unstract.localhost`)
|
||||
- traefik.http.services.feature-flag.loadbalancer.server.port=8080
|
||||
feature-flag:
|
||||
image: flipt/flipt:v1.34.0 # Dated(05/01/2024) Latest stable version. Ref:https://github.com/flipt-io/flipt/releases
|
||||
container_name: unstract-flipt
|
||||
restart: unless-stopped
|
||||
ports: # Forwarded to available host ports
|
||||
- "8082:8080" # REST API port
|
||||
- "9005:9000" # gRPC port
|
||||
# https://www.flipt.io/docs/configuration/overview#environment-variables)
|
||||
# https://www.flipt.io/docs/configuration/overview#configuration-parameters
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
FLIPT_CACHE_ENABLED: true
|
||||
FLIPT_DB_URL: postgres://unstract_dev:unstract_pass@db:5432/unstract_db?sslmode=disable
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.feature-flag.rule=Host(`feature-flag.unstract.localhost`)
|
||||
- traefik.http.services.feature-flag.loadbalancer.server.port=8080
|
||||
|
||||
unstructured-io:
|
||||
profiles:
|
||||
- optional
|
||||
image: downloads.unstructured.io/unstructured-io/unstructured-api:0.0.61
|
||||
container_name: unstract-unstructured-io
|
||||
restart: unless-stopped
|
||||
ports: # Forwarded to available host ports
|
||||
- "8083:8000"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
unstructured-io:
|
||||
profiles:
|
||||
- optional
|
||||
image: downloads.unstructured.io/unstructured-io/unstructured-api:0.0.61
|
||||
container_name: unstract-unstructured-io
|
||||
restart: unless-stopped
|
||||
ports: # Forwarded to available host ports
|
||||
- "8083:8000"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
qdrant:
|
||||
# Vector DB for doc indexer
|
||||
image: "qdrant/qdrant:v1.8.3"
|
||||
container_name: unstract-vector-db
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6333:6333"
|
||||
volumes:
|
||||
- qdrant_data:/var/lib/qdrant/data/
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
env_file:
|
||||
- ./essentials.env
|
||||
qdrant:
|
||||
# Vector DB for doc indexer
|
||||
image: "qdrant/qdrant:v1.8.3"
|
||||
container_name: unstract-vector-db
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6333:6333"
|
||||
volumes:
|
||||
- qdrant_data:/var/lib/qdrant/data/
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
env_file:
|
||||
- ./essentials.env
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:4.1.0-management
|
||||
container_name: unstract-rabbitmq
|
||||
hostname: unstract-rabbit
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./essentials.env
|
||||
ports:
|
||||
- "5672:5672" # AMQP port
|
||||
- "15672:15672" # Management UI port
|
||||
volumes:
|
||||
- rabbitmq_data:/var/lib/rabbitmq
|
||||
rabbitmq:
|
||||
image: rabbitmq:4.1.0-management
|
||||
container_name: unstract-rabbitmq
|
||||
hostname: unstract-rabbit
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./essentials.env
|
||||
ports:
|
||||
- "5672:5672" # AMQP port
|
||||
- "15672:15672" # Management UI port
|
||||
volumes:
|
||||
- rabbitmq_data:/var/lib/rabbitmq
|
||||
|
||||
volumes:
|
||||
flipt_data:
|
||||
minio_data:
|
||||
postgres_data:
|
||||
qdrant_data:
|
||||
redis_data:
|
||||
prompt_studio_data:
|
||||
rabbitmq_data:
|
||||
flipt_data:
|
||||
minio_data:
|
||||
postgres_data:
|
||||
qdrant_data:
|
||||
redis_data:
|
||||
prompt_studio_data:
|
||||
rabbitmq_data:
|
||||
|
||||
@@ -52,7 +52,7 @@ services:
|
||||
context: ..
|
||||
# Unified worker image (replaces all individual worker images)
|
||||
worker-unified:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
image: unstract/worker-unifi ed:${VERSION}
|
||||
build:
|
||||
dockerfile: docker/dockerfiles/worker-unified.Dockerfile
|
||||
context: ..
|
||||
|
||||
563
docker/docker-compose.host..yaml.bk
Normal file
563
docker/docker-compose.host..yaml.bk
Normal file
@@ -0,0 +1,563 @@
|
||||
include:
|
||||
- docker-compose-dev-essentials.host.yaml
|
||||
|
||||
services:
|
||||
# Backend service
|
||||
backend:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-backend
|
||||
restart: unless-stopped
|
||||
command: --migrate
|
||||
expose:
|
||||
- "8000"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/backend/.env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
- reverse-proxy
|
||||
- minio
|
||||
- minio-bootstrap
|
||||
- platform-service
|
||||
- prompt-service
|
||||
- x2text-service
|
||||
volumes:
|
||||
- prompt_studio_data:/app/prompt-studio-data
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-backend
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.backend.rule=Host(`frontend.unstract.localhost`) && PathPrefix(`/api/v1`, `/deployment`)
|
||||
extra_hosts:
|
||||
# "host-gateway" is a special string that translates to host docker0 i/f IP.
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
# Celery default worker
|
||||
worker:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-worker
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend worker --loglevel=info -Q celery,celery_api_deployments --autoscale=${WORKER_AUTOSCALE}"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/backend/.env
|
||||
depends_on:
|
||||
- rabbitmq
|
||||
- db
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
|
||||
|
||||
# Celery worker for managing logs and periodic tasks
|
||||
worker-logging:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-worker-logging
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend worker --loglevel=info -Q celery_periodic_logs,celery_log_task_queue --autoscale=${WORKER_LOGGING_AUTOSCALE}"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/backend/.env
|
||||
depends_on:
|
||||
- rabbitmq
|
||||
- db
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-logging
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
# Celery worker for handling file processing tasks
|
||||
worker-file-processing:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-worker-file-processing
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend.workers.file_processing worker --loglevel=info -Q file_processing,api_file_processing --autoscale=${WORKER_FILE_PROCESSING_AUTOSCALE}"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/backend/.env
|
||||
depends_on:
|
||||
- rabbitmq
|
||||
- db
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-file-processing
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
|
||||
worker-file-processing-callback:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-worker-file-processing-callback
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend.workers.file_processing_callback worker --loglevel=info -Q file_processing_callback,api_file_processing_callback --autoscale=${WORKER_FILE_PROCESSING_CALLBACK_AUTOSCALE}"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/backend/.env
|
||||
depends_on:
|
||||
- rabbitmq
|
||||
- db
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-file-processing-callback
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
|
||||
# Celery Flower
|
||||
celery-flower:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-celery-flower
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend flower --port=5555 --purge_offline_workers=5"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/backend/.env
|
||||
depends_on:
|
||||
- worker
|
||||
- worker-logging
|
||||
- rabbitmq
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
# ports:
|
||||
# - "5555:5555"
|
||||
expose:
|
||||
- "5555"
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-celery-flower
|
||||
volumes:
|
||||
- unstract_data:/data
|
||||
profiles:
|
||||
- optional
|
||||
|
||||
# Celery Beat
|
||||
celery-beat:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-celery-beat
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend beat --scheduler django_celery_beat.schedulers:DatabaseScheduler -l INFO"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/backend/.env
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
depends_on:
|
||||
- db
|
||||
- rabbitmq
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-celery-beat
|
||||
|
||||
# Frontend React app
|
||||
frontend:
|
||||
image: unstract/frontend:${VERSION}
|
||||
container_name: unstract-frontend
|
||||
restart: unless-stopped
|
||||
# ports:
|
||||
# - "3000:80"
|
||||
#
|
||||
expose:
|
||||
- "80"
|
||||
depends_on:
|
||||
- backend
|
||||
- reverse-proxy
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.frontend.rule=Host(`frontend.unstract.localhost`) && !PathPrefix(`/api/v1`, `/deployment`)
|
||||
|
||||
platform-service:
|
||||
image: unstract/platform-service:${VERSION}
|
||||
container_name: unstract-platform-service
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "3001"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/docker/platform-service/.env
|
||||
depends_on:
|
||||
- redis
|
||||
- db
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
prompt-service:
|
||||
image: unstract/prompt-service:${VERSION}
|
||||
container_name: unstract-prompt-service
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
- minio
|
||||
- minio-bootstrap
|
||||
- rabbitmq
|
||||
expose:
|
||||
- "3003"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/docker/prompt-service/.env
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
extra_hosts:
|
||||
# "host-gateway" is a special string that translates to host docker0 i/f IP.
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
x2text-service:
|
||||
image: unstract/x2text-service:${VERSION}
|
||||
container_name: unstract-x2text-service
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "3004"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/docker/x2text-service/.env
|
||||
depends_on:
|
||||
- db
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
runner:
|
||||
image: unstract/runner:${VERSION}
|
||||
container_name: unstract-runner
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 5002:5002
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/docker/runner/.env
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
# Docker socket bind mount to spawn tool containers
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /home/trav/.secrets/registry.txt:/run/secrets/registry.txt:ro
|
||||
depends_on:
|
||||
- redis
|
||||
- rabbitmq
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
# ====================================================================
|
||||
# V2 DEDICATED WORKER SERVICES (opt-in with --workers-v2 flag)
|
||||
# ====================================================================
|
||||
|
||||
worker-api-deployment-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-api-deployment-v2
|
||||
restart: unless-stopped
|
||||
command: ["api-deployment"]
|
||||
ports:
|
||||
- "8085:8090"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/workers/.env
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-api-deployment-v2
|
||||
- WORKER_TYPE=api_deployment
|
||||
- CELERY_QUEUES_API_DEPLOYMENT=${CELERY_QUEUES_API_DEPLOYMENT:-celery_api_deployments}
|
||||
- CELERY_POOL=${WORKER_API_DEPLOYMENT_POOL:-threads}
|
||||
- CELERY_PREFETCH_MULTIPLIER=${WORKER_API_DEPLOYMENT_PREFETCH_MULTIPLIER:-1}
|
||||
- CELERY_CONCURRENCY=${WORKER_API_DEPLOYMENT_CONCURRENCY:-4}
|
||||
- CELERY_EXTRA_ARGS=${WORKER_API_DEPLOYMENT_EXTRA_ARGS:-}
|
||||
- WORKER_NAME=api-deployment-worker-v2
|
||||
- API_DEPLOYMENT_METRICS_PORT=8090
|
||||
- HEALTH_PORT=8090
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-callback-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-callback-v2
|
||||
restart: unless-stopped
|
||||
command: ["callback"]
|
||||
ports:
|
||||
- "8086:8083"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/workers/.env
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-callback-v2
|
||||
- WORKER_TYPE=callback
|
||||
- WORKER_NAME=callback-worker-v2
|
||||
- CALLBACK_METRICS_PORT=8083
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-file-processing-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-file-processing-v2
|
||||
restart: unless-stopped
|
||||
# command: ["file-processing"]
|
||||
command: [".venv/bin/celery", "-A", "worker", "worker", "--queues=file_processing,api_file_processing,file_processing_priority", "--loglevel=INFO", "--pool=prefork", "--concurrency=4", "--prefetch-multiplier=1", "--without-gossip", "--without-mingle", "--without-heartbeat"]
|
||||
ports:
|
||||
- "8087:8082"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/workers/.env
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-file-processing-v2
|
||||
- WORKER_TYPE=file_processing
|
||||
- WORKER_MODE=oss
|
||||
- WORKER_NAME=file-processing-worker-v2
|
||||
- FILE_PROCESSING_METRICS_PORT=8082
|
||||
# OSS Configuration - Enterprise features disabled
|
||||
- MANUAL_REVIEW_ENABLED=false
|
||||
- ENTERPRISE_FEATURES_ENABLED=false
|
||||
- PLUGIN_REGISTRY_MODE=oss
|
||||
# Configurable Celery options
|
||||
- CELERY_QUEUES_FILE_PROCESSING=${CELERY_QUEUES_FILE_PROCESSING:-file_processing,api_file_processing}
|
||||
- CELERY_POOL=${WORKER_FILE_PROCESSING_POOL:-threads}
|
||||
- CELERY_PREFETCH_MULTIPLIER=${WORKER_FILE_PROCESSING_PREFETCH_MULTIPLIER:-1}
|
||||
- CELERY_CONCURRENCY=${WORKER_FILE_PROCESSING_CONCURRENCY:-4}
|
||||
- CELERY_EXTRA_ARGS=${WORKER_FILE_PROCESSING_EXTRA_ARGS:-}
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-general-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-general-v2
|
||||
restart: unless-stopped
|
||||
command: ["general"]
|
||||
ports:
|
||||
- "8088:8082"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/workers/.env
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-general-v2
|
||||
- WORKER_TYPE=general
|
||||
- WORKER_NAME=general-worker-v2
|
||||
- GENERAL_METRICS_PORT=8081
|
||||
- HEALTH_PORT=8082
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-notification-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-notification-v2
|
||||
restart: unless-stopped
|
||||
command: ["notification"]
|
||||
ports:
|
||||
- "8089:8085"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/workers/.env
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-notification-v2
|
||||
- WORKER_TYPE=notification
|
||||
- WORKER_NAME=notification-worker-v2
|
||||
- NOTIFICATION_METRICS_PORT=8085
|
||||
- HEALTH_PORT=8085
|
||||
# Notification specific configs
|
||||
- NOTIFICATION_QUEUE_NAME=notifications
|
||||
- WEBHOOK_QUEUE_NAME=notifications_webhook
|
||||
- EMAIL_QUEUE_NAME=notifications_email
|
||||
- SMS_QUEUE_NAME=notifications_sms
|
||||
- PRIORITY_QUEUE_NAME=notifications_priority
|
||||
# Configurable Celery options
|
||||
- CELERY_QUEUES_NOTIFICATION=${CELERY_QUEUES_NOTIFICATION:-notifications,notifications_webhook,notifications_email,notifications_sms,notifications_priority}
|
||||
- CELERY_POOL=${WORKER_NOTIFICATION_POOL:-prefork}
|
||||
- CELERY_PREFETCH_MULTIPLIER=${WORKER_NOTIFICATION_PREFETCH_MULTIPLIER:-1}
|
||||
- CELERY_CONCURRENCY=${WORKER_NOTIFICATION_CONCURRENCY:-4}
|
||||
- CELERY_EXTRA_ARGS=${WORKER_NOTIFICATION_EXTRA_ARGS:-}
|
||||
# Complete command override (if set, ignores all other options)
|
||||
- CELERY_COMMAND_OVERRIDE=${WORKER_NOTIFICATION_COMMAND_OVERRIDE:-}
|
||||
# Individual argument overrides
|
||||
- CELERY_APP_MODULE=${WORKER_NOTIFICATION_APP_MODULE:-worker}
|
||||
- CELERY_LOG_LEVEL=${WORKER_NOTIFICATION_LOG_LEVEL:-INFO}
|
||||
- CELERY_HOSTNAME=${WORKER_NOTIFICATION_HOSTNAME:-}
|
||||
- CELERY_MAX_TASKS_PER_CHILD=${WORKER_NOTIFICATION_MAX_TASKS_PER_CHILD:-}
|
||||
- CELERY_TIME_LIMIT=${WORKER_NOTIFICATION_TIME_LIMIT:-}
|
||||
- CELERY_SOFT_TIME_LIMIT=${WORKER_NOTIFICATION_SOFT_TIME_LIMIT:-}
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/dockerworkflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-log-consumer-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-log-consumer-v2
|
||||
restart: unless-stopped
|
||||
command: ["log-consumer"]
|
||||
ports:
|
||||
- "8090:8084"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/workers/.env
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-log-consumer-v2
|
||||
- WORKER_TYPE=log_consumer
|
||||
- WORKER_NAME=log-consumer-worker-v2
|
||||
- LOG_CONSUMER_METRICS_PORT=8084
|
||||
- HEALTH_PORT=8084
|
||||
# Log consumer specific configs
|
||||
- LOG_CONSUMER_QUEUE_NAME=celery_log_task_queue
|
||||
# Multiple queue support - supports comma-separated queue names
|
||||
- CELERY_QUEUES_LOG_CONSUMER=${CELERY_QUEUES_LOG_CONSUMER:-celery_log_task_queue,celery_periodic_logs}
|
||||
- PERIODIC_LOGS_QUEUE_NAME=${PERIODIC_LOGS_QUEUE_NAME:-celery_periodic_logs}
|
||||
# Log history configuration
|
||||
- LOG_HISTORY_QUEUE_NAME=${LOG_HISTORY_QUEUE_NAME:-log_history_queue}
|
||||
- LOGS_BATCH_LIMIT=${LOGS_BATCH_LIMIT:-100}
|
||||
- ENABLE_LOG_HISTORY=${ENABLE_LOG_HISTORY:-true}
|
||||
- CELERY_POOL=${WORKER_LOG_CONSUMER_POOL:-prefork}
|
||||
- CELERY_PREFETCH_MULTIPLIER=${WORKER_LOG_CONSUMER_PREFETCH_MULTIPLIER:-1}
|
||||
- CELERY_CONCURRENCY=${WORKER_LOG_CONSUMER_CONCURRENCY:-2}
|
||||
- CELERY_EXTRA_ARGS=${WORKER_LOG_CONSUMER_EXTRA_ARGS:-}
|
||||
# Complete command override (if set, ignores all other options)
|
||||
- CELERY_COMMAND_OVERRIDE=${WORKER_LOG_CONSUMER_COMMAND_OVERRIDE:-}
|
||||
# Individual argument overrides
|
||||
- CELERY_APP_MODULE=${WORKER_LOG_CONSUMER_APP_MODULE:-worker}
|
||||
- CELERY_LOG_LEVEL=${WORKER_LOG_CONSUMER_LOG_LEVEL:-INFO}
|
||||
- CELERY_HOSTNAME=${WORKER_LOG_CONSUMER_HOSTNAME:-}
|
||||
- CELERY_MAX_TASKS_PER_CHILD=${WORKER_LOG_CONSUMER_MAX_TASKS_PER_CHILD:-}
|
||||
- CELERY_TIME_LIMIT=${WORKER_LOG_CONSUMER_TIME_LIMIT:-}
|
||||
- CELERY_SOFT_TIME_LIMIT=${WORKER_LOG_CONSUMER_SOFT_TIME_LIMIT:-}
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-log-history-scheduler-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-log-history-scheduler-v2
|
||||
restart: unless-stopped
|
||||
entrypoint: ["/bin/bash"]
|
||||
command: ["/app/log_consumer/scheduler.sh"]
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/workers/.env
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-log-history-scheduler-v2
|
||||
# Scheduler interval in seconds
|
||||
- LOG_HISTORY_CONSUMER_INTERVAL=${LOG_HISTORY_CONSUMER_INTERVAL:-5}
|
||||
# Override example: TASK_TRIGGER_COMMAND=/custom/trigger/script.sh
|
||||
- TASK_TRIGGER_COMMAND=${TASK_TRIGGER_COMMAND:-}
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-scheduler-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-scheduler-v2
|
||||
restart: unless-stopped
|
||||
command: ["scheduler"]
|
||||
ports:
|
||||
- "8091:8087"
|
||||
env_file:
|
||||
- /home/trav/apps/unstract/workers/.env
|
||||
- /home/trav/apps/unstract/docker/essentials.env
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
- APPLICATION_NAME=unstract-worker-scheduler-v2
|
||||
- WORKER_TYPE=scheduler
|
||||
- WORKER_NAME=scheduler-worker-v2
|
||||
- SCHEDULER_METRICS_PORT=8087
|
||||
- HEALTH_PORT=8087
|
||||
# Scheduler specific configs
|
||||
- SCHEDULER_QUEUE_NAME=scheduler
|
||||
# Configurable Celery options
|
||||
- CELERY_QUEUES_SCHEDULER=${CELERY_QUEUES_SCHEDULER:-scheduler}
|
||||
- CELERY_POOL=${WORKER_SCHEDULER_POOL:-prefork}
|
||||
- CELERY_PREFETCH_MULTIPLIER=${WORKER_SCHEDULER_PREFETCH_MULTIPLIER:-1}
|
||||
- CELERY_CONCURRENCY=${WORKER_SCHEDULER_CONCURRENCY:-2}
|
||||
- CELERY_EXTRA_ARGS=${WORKER_SCHEDULER_EXTRA_ARGS:-}
|
||||
# Complete command override (if set, ignores all other options)
|
||||
- CELERY_COMMAND_OVERRIDE=${WORKER_SCHEDULER_COMMAND_OVERRIDE:-}
|
||||
# Individual argument overrides
|
||||
- CELERY_APP_MODULE=${WORKER_SCHEDULER_APP_MODULE:-worker}
|
||||
- CELERY_LOG_LEVEL=${WORKER_SCHEDULER_LOG_LEVEL:-INFO}
|
||||
- CELERY_HOSTNAME=${WORKER_SCHEDULER_HOSTNAME:-}
|
||||
- CELERY_MAX_TASKS_PER_CHILD=${WORKER_SCHEDULER_MAX_TASKS_PER_CHILD:-}
|
||||
- CELERY_TIME_LIMIT=${WORKER_SCHEDULER_TIME_LIMIT:-}
|
||||
- CELERY_SOFT_TIME_LIMIT=${WORKER_SCHEDULER_SOFT_TIME_LIMIT:-}
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
volumes:
|
||||
prompt_studio_data:
|
||||
unstract_data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
# NOTE:
|
||||
# Any changes need to be reflected in proxy service too.
|
||||
name: unstract-network
|
||||
975
docker/docker-compose.host.yaml
Normal file
975
docker/docker-compose.host.yaml
Normal file
@@ -0,0 +1,975 @@
|
||||
include:
|
||||
- docker-compose-dev-essentials.host.yaml
|
||||
|
||||
x-backend-env: &backend_env
|
||||
DJANGO_SETTINGS_MODULE: "backend.settings.dev"
|
||||
SESSION_COOKIE_SECURE: "False"
|
||||
CSRF_COOKIE_SECURE: "False"
|
||||
DEFAULT_LOG_LEVEL: "INFO"
|
||||
PATH_PREFIX: "api/v1"
|
||||
DJANGO_APP_BACKEND_URL: "http://unstract.toy"
|
||||
DJANGO_SECRET_KEY: "1(xf&nc6!y7!l&!5xe&i_rx7e^m@fcut9fduv86ft=-b@2g6"
|
||||
DB_HOST: "unstract-db"
|
||||
DB_USER: "unstract_dev"
|
||||
DB_PASSWORD: "unstract_pass"
|
||||
DB_NAME: "unstract_db"
|
||||
DB_PORT: "5432"
|
||||
DB_SCHEMA: "unstract"
|
||||
REDIS_HOST: "unstract-redis"
|
||||
REDIS_PORT: "6379"
|
||||
REDIS_PASSWORD: ""
|
||||
REDIS_USER: "default"
|
||||
REDIS_RETRY_MAX_ATTEMPTS: "4"
|
||||
REDIS_RETRY_BACKOFF_FACTOR: "0.5"
|
||||
SOCIAL_AUTH_EXTRA_DATA_EXPIRATION_TIME_IN_SECOND: "3600"
|
||||
GOOGLE_OAUTH2_KEY: ""
|
||||
GOOGLE_OAUTH2_SECRET: ""
|
||||
SESSION_EXPIRATION_TIME_IN_SECOND: "7200"
|
||||
WEB_APP_ORIGIN_URL: "http://unstract.toy"
|
||||
INTERNAL_SERVICE_API_KEY: ""
|
||||
BUILTIN_FUNCTIONS_API_KEY: ""
|
||||
FREE_STORAGE_AWS_ACCESS_KEY_ID: ""
|
||||
FREE_STORAGE_AWS_SECRET_ACCESS_KEY: ""
|
||||
UNSTRACT_FREE_STORAGE_BUCKET_NAME: ""
|
||||
GDRIVE_GOOGLE_SERVICE_ACCOUNT: ""
|
||||
GDRIVE_GOOGLE_PROJECT_ID: ""
|
||||
GOOGLE_STORAGE_ACCESS_KEY_ID: ""
|
||||
GOOGLE_STORAGE_SECRET_ACCESS_KEY: ""
|
||||
GOOGLE_STORAGE_BASE_URL: "https://storage.googleapis.com"
|
||||
PLATFORM_SERVICE_HOST: "http://unstract-platform-service"
|
||||
PLATFORM_SERVICE_PORT: "3001"
|
||||
UNSTRACT_RUNNER_HOST: "http://unstract-runner"
|
||||
UNSTRACT_RUNNER_PORT: "5002"
|
||||
UNSTRACT_RUNNER_API_TIMEOUT: "240"
|
||||
UNSTRACT_RUNNER_API_RETRY_COUNT: "5"
|
||||
UNSTRACT_RUNNER_API_BACKOFF_FACTOR: "3"
|
||||
PROMPT_HOST: "http://unstract-prompt-service"
|
||||
PROMPT_PORT: "3003"
|
||||
PROMPT_STUDIO_FILE_PATH: "/app/prompt-studio-data"
|
||||
STRUCTURE_TOOL_IMAGE_URL: "docker:unstract/tool-structure:0.0.89"
|
||||
STRUCTURE_TOOL_IMAGE_NAME: "unstract/tool-structure"
|
||||
STRUCTURE_TOOL_IMAGE_TAG: "0.0.89"
|
||||
EVALUATION_SERVER_IP: "unstract-flipt"
|
||||
EVALUATION_SERVER_PORT: "9000"
|
||||
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: "python"
|
||||
X2TEXT_HOST: "http://unstract-x2text-service"
|
||||
X2TEXT_PORT: "3004"
|
||||
ENCRYPTION_KEY: "Ct7TKc9wTZdEPch8pLuWa19PEU8TlBIoc9i0HDx0xfg="
|
||||
CACHE_TTL_SEC: "10800"
|
||||
DEFAULT_AUTH_USERNAME: "trav"
|
||||
DEFAULT_AUTH_PASSWORD: "squirtle123"
|
||||
SYSTEM_ADMIN_USERNAME: "vasceannie"
|
||||
SYSTEM_ADMIN_PASSWORD: "squirtle123"
|
||||
SYSTEM_ADMIN_EMAIL: "travis.vas@gmail.com"
|
||||
SESSION_COOKIE_AGE: "86400"
|
||||
ADAPTER_LLMW_POLL_INTERVAL: "30"
|
||||
ADAPTER_LLMW_MAX_POLLS: "1000"
|
||||
ADAPTER_LLMW_STATUS_RETRIES: "5"
|
||||
ENABLE_LOG_HISTORY: "True"
|
||||
LOG_HISTORY_CONSUMER_INTERVAL: "30"
|
||||
LOGS_BATCH_LIMIT: "30"
|
||||
LOGS_EXPIRATION_TIME_IN_SECOND: "86400"
|
||||
CELERY_BROKER_BASE_URL: "amqp://unstract-rabbitmq:5672//"
|
||||
CELERY_BROKER_USER: "admin"
|
||||
CELERY_BROKER_PASS: "password"
|
||||
INDEXING_FLAG_TTL: "1800"
|
||||
NOTIFICATION_TIMEOUT: "5"
|
||||
TOOL_REGISTRY_CONFIG_SRC_PATH: "/home/trav/apps/unstract/docker/tool_registry_config"
|
||||
FLIPT_SERVICE_AVAILABLE: "False"
|
||||
WORKFLOW_EXECUTION_DIR_PREFIX: "unstract/execution"
|
||||
API_EXECUTION_DIR_PREFIX: "unstract/api"
|
||||
WORKFLOW_EXECUTION_FILE_STORAGE_CREDENTIALS: '{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
|
||||
API_FILE_STORAGE_CREDENTIALS: '{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
|
||||
PERMANENT_REMOTE_STORAGE: '{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
|
||||
REMOTE_PROMPT_STUDIO_FILE_PATH: "unstract/prompt-studio-data"
|
||||
TOOL_REGISTRY_STORAGE_CREDENTIALS: '{"provider":"local"}'
|
||||
ENABLE_HIGHLIGHT_API_DEPLOYMENT: "True"
|
||||
EXECUTION_RESULT_TTL_SECONDS: "86400"
|
||||
EXECUTION_CACHE_TTL_SECONDS: "86400"
|
||||
INSTANT_WF_POLLING_TIMEOUT: "300"
|
||||
MAX_PARALLEL_FILE_BATCHES: "1"
|
||||
MAX_PARALLEL_FILE_BATCHES_MAX_VALUE: "100"
|
||||
WORKFLOW_PAGE_MAX_FILES: "2"
|
||||
FILE_EXECUTION_TRACKER_TTL_IN_SECOND: "18000"
|
||||
FILE_EXECUTION_TRACKER_COMPLETED_TTL_IN_SECOND: "600"
|
||||
MAX_RUNNER_POLLING_WAIT_SECONDS: "10800"
|
||||
RUNNER_POLLING_INTERVAL_SECONDS: "2"
|
||||
MIN_SCHEDULE_INTERVAL_SECONDS: "1800"
|
||||
FILE_ACTIVE_CACHE_REDIS_DB: "0"
|
||||
|
||||
x-essentials-env: &essentials_env
|
||||
POSTGRES_USER: "unstract_dev"
|
||||
POSTGRES_PASSWORD: "unstract_pass"
|
||||
POSTGRES_DB: "unstract_db"
|
||||
POSTGRES_SCHEMA: "unstract"
|
||||
MINIO_ROOT_USER: "minio"
|
||||
MINIO_ROOT_PASSWORD: "minio123"
|
||||
MINIO_ACCESS_KEY: "minio"
|
||||
MINIO_SECRET_KEY: "minio123"
|
||||
FLIPT_DB_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable"
|
||||
QDRANT_USER: "unstract_vector_dev"
|
||||
QDRANT_PASS: "unstract_vector_pass"
|
||||
QDRANT_DB: "unstract_vector_db"
|
||||
RABBITMQ_DEFAULT_USER: "admin"
|
||||
RABBITMQ_DEFAULT_PASS: "password"
|
||||
|
||||
x-platform-service-env: &platform_service_env
|
||||
FLASK_APP: "src/unstract/platform_service/run.py"
|
||||
FLASK_RUN_PORT: "3001"
|
||||
REDIS_HOST: "unstract-redis"
|
||||
REDIS_PORT: "6379"
|
||||
REDIS_USERNAME: "default"
|
||||
REDIS_PASSWORD: ""
|
||||
PG_BE_HOST: "unstract-db"
|
||||
PG_BE_PORT: "5432"
|
||||
PG_BE_USERNAME: "unstract_dev"
|
||||
PG_BE_PASSWORD: "unstract_pass"
|
||||
PG_BE_DATABASE: "unstract_db"
|
||||
DB_SCHEMA: "unstract"
|
||||
ENCRYPTION_KEY: "Ct7TKc9wTZdEPch8pLuWa19PEU8TlBIoc9i0HDx0xfg="
|
||||
EVALUATION_SERVER_IP: "unstract-flipt"
|
||||
EVALUATION_SERVER_PORT: "9000"
|
||||
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: "python"
|
||||
FLIPT_SERVICE_AVAILABLE: "False"
|
||||
MODEL_PRICES_URL: "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json"
|
||||
MODEL_PRICES_TTL_IN_DAYS: "7"
|
||||
MODEL_PRICES_FILE_PATH: "<bucket-name>/cost/model_prices.json"
|
||||
FILE_STORAGE_CREDENTIALS: '{"provider":"local"}'
|
||||
REMOTE_MODEL_PRICES_FILE_PATH: "unstract/cost/model_prices.json"
|
||||
LOG_LEVEL: "INFO"
|
||||
|
||||
x-prompt-service-env: &prompt_service_env
|
||||
PG_BE_HOST: "unstract-db"
|
||||
PG_BE_PORT: "5432"
|
||||
PG_BE_USERNAME: "unstract_dev"
|
||||
PG_BE_PASSWORD: "unstract_pass"
|
||||
PG_BE_DATABASE: "unstract_db"
|
||||
DB_SCHEMA: "unstract"
|
||||
REDIS_HOST: "unstract-redis"
|
||||
REDIS_PORT: "6379"
|
||||
REDIS_PASSWORD: ""
|
||||
REDIS_USER: "default"
|
||||
LOG_LEVEL: "INFO"
|
||||
CELERY_BROKER_BASE_URL: "amqp://unstract-rabbitmq:5672//"
|
||||
CELERY_BROKER_USER: "admin"
|
||||
CELERY_BROKER_PASS: "password"
|
||||
LOGS_EXPIRATION_TIME_IN_SECOND: "86400"
|
||||
EVALUATION_SERVER_IP: "unstract-flipt"
|
||||
EVALUATION_SERVER_PORT: "9000"
|
||||
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: "python"
|
||||
FLIPT_SERVICE_AVAILABLE: "False"
|
||||
PLATFORM_SERVICE_HOST: "http://unstract-platform-service"
|
||||
PLATFORM_SERVICE_PORT: "3001"
|
||||
X2TEXT_HOST: "http://unstract-x2text-service"
|
||||
X2TEXT_PORT: "3004"
|
||||
PERMANENT_REMOTE_STORAGE: '{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
|
||||
TEMPORARY_REMOTE_STORAGE: '{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
|
||||
REMOTE_PROMPT_STUDIO_FILE_PATH: "unstract/prompt-studio-data/"
|
||||
ADAPTER_LLMW_WAIT_TIMEOUT: "900"
|
||||
ADAPTER_LLMW_POLL_INTERVAL: "30"
|
||||
ADAPTER_LLMW_MAX_POLLS: "1000"
|
||||
ADAPTER_LLMW_STATUS_RETRIES: "5"
|
||||
RENTROLL_SERVICE_HOST: "http://unstract-rentroll-service"
|
||||
RENTROLL_SERVICE_PORT: "5003"
|
||||
|
||||
x-x2text-service-env: &x2text_service_env
|
||||
FLASK_ENV: "production"
|
||||
FLASK_RUN_HOST: "0.0.0.0"
|
||||
FLASK_RUN_PORT: "3004"
|
||||
API_URL_PREFIX: "/api/v1"
|
||||
DB_HOST: "unstract-db"
|
||||
DB_PORT: "5432"
|
||||
DB_USERNAME: "unstract_dev"
|
||||
DB_PASSWORD: "unstract_pass"
|
||||
DB_NAME: "unstract_db"
|
||||
DB_SCHEMA: "unstract"
|
||||
|
||||
x-runner-env: &runner_env
|
||||
CELERY_BROKER_BASE_URL: "amqp://unstract-rabbitmq:5672//"
|
||||
CELERY_BROKER_USER: "admin"
|
||||
CELERY_BROKER_PASS: "password"
|
||||
TOOL_CONTAINER_NETWORK: "unstract-network"
|
||||
TOOL_CONTAINER_LABELS: "[]"
|
||||
PRIVATE_REGISTRY_CREDENTIAL_PATH: "/home/trav/.secrets/registry.txt"
|
||||
PRIVATE_REGISTRY_USERNAME: "vasceannie"
|
||||
PRIVATE_REGISTRY_URL: "git.sidepiece.rip"
|
||||
LOG_LEVEL: "INFO"
|
||||
REMOVE_CONTAINER_ON_EXIT: "True"
|
||||
CONTAINER_CLIENT_PATH: "unstract.runner.clients.docker_client"
|
||||
LOGS_EXPIRATION_TIME_IN_SECOND: "86400"
|
||||
FLIPT_SERVICE_AVAILABLE: "False"
|
||||
EVALUATION_SERVER_IP: "unstract-flipt"
|
||||
EVALUATION_SERVER_PORT: "9005"
|
||||
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: "python"
|
||||
WORKFLOW_EXECUTION_DIR_PREFIX: "unstract/execution"
|
||||
WORKFLOW_EXECUTION_FILE_STORAGE_CREDENTIALS: '{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
|
||||
REDIS_HOST: "unstract-redis"
|
||||
REDIS_PORT: "6379"
|
||||
REDIS_USER: "default"
|
||||
REDIS_PASSWORD: ""
|
||||
FLASK_ENV: "production"
|
||||
FLASK_RUN_HOST: "0.0.0.0"
|
||||
FLASK_RUN_PORT: "5002"
|
||||
FLASK_APP: "unstract.runner:app"
|
||||
TOOL_SIDECAR_ENABLED: "True"
|
||||
TOOL_SIDECAR_IMAGE_NAME: "unstract/tool-sidecar"
|
||||
TOOL_SIDECAR_IMAGE_TAG: "0.2.0"
|
||||
TOOL_EXECUTION_CACHE_TTL_IN_SECOND: "86400"
|
||||
FILE_EXECUTION_TRACKER_TTL_IN_SECOND: "18000"
|
||||
|
||||
x-workers-env: &workers_env
|
||||
DJANGO_APP_BACKEND_URL: "http://unstract-backend:8000"
|
||||
INTERNAL_API_BASE_URL: "http://unstract-backend:8000/internal"
|
||||
INTERNAL_API_PREFIX: "/internal"
|
||||
INTERNAL_API_VERSION: "v1"
|
||||
INTERNAL_SERVICE_API_KEY: "dev-internal-key-123"
|
||||
INTERNAL_API_TIMEOUT: "120"
|
||||
INTERNAL_API_RETRY_ATTEMPTS: "3"
|
||||
INTERNAL_API_RETRY_BACKOFF_FACTOR: "1.0"
|
||||
INTERNAL_API_HEALTH_PREFIX: "v1/health/"
|
||||
INTERNAL_API_TOOL_PREFIX: "v1/tool-execution/"
|
||||
INTERNAL_API_EXECUTION_PREFIX: "v1/execution/"
|
||||
INTERNAL_API_WEBHOOK_PREFIX: "v1/webhook/"
|
||||
INTERNAL_API_FILE_HISTORY_PREFIX: "v1/file-history/"
|
||||
INTERNAL_API_WORKFLOW_PREFIX: "v1/workflow-execution/"
|
||||
INTERNAL_API_ORGANIZATION_PREFIX: "v1/organization/"
|
||||
CELERY_BROKER_BASE_URL: "amqp://unstract-rabbitmq:5672//"
|
||||
CELERY_BROKER_USER: "admin"
|
||||
CELERY_BROKER_PASS: "password"
|
||||
DB_HOST: "unstract-db"
|
||||
DB_USER: "unstract_dev"
|
||||
DB_PASSWORD: "unstract_pass"
|
||||
DB_NAME: "unstract_db"
|
||||
DB_PORT: "5432"
|
||||
DB_SCHEMA: "unstract"
|
||||
CELERY_BACKEND_DB_SCHEMA: "public"
|
||||
REDIS_HOST: "unstract-redis"
|
||||
REDIS_PORT: "6379"
|
||||
REDIS_PASSWORD: ""
|
||||
REDIS_USER: "default"
|
||||
REDIS_DB: "0"
|
||||
CACHE_REDIS_ENABLED: "true"
|
||||
CACHE_REDIS_HOST: "unstract-redis"
|
||||
CACHE_REDIS_PORT: "6379"
|
||||
CACHE_REDIS_DB: "0"
|
||||
CACHE_REDIS_PASSWORD: ""
|
||||
CACHE_REDIS_USERNAME: ""
|
||||
CACHE_REDIS_SSL: "false"
|
||||
CACHE_REDIS_SSL_CERT_REQS: "required"
|
||||
DATABASE_URL: "postgresql://unstract_dev:unstract_pass@unstract-db:5432/unstract_db"
|
||||
ENABLE_API_CLIENT_SINGLETON: "true"
|
||||
DEBUG_API_CLIENT_INIT: "false"
|
||||
WORKER_INFRASTRUCTURE_HEALTH_CHECK: "true"
|
||||
API_CLIENT_POOL_SIZE: "3"
|
||||
ENABLE_CONFIG_CACHE: "true"
|
||||
CONFIG_CACHE_TTL: "300"
|
||||
ENABLE_DEBUG_LOGGING: "false"
|
||||
DEBUG_ORGANIZATION_CONTEXT: "false"
|
||||
MAX_CONCURRENT_TASKS: "10"
|
||||
CELERY_WORKER_PREFETCH_MULTIPLIER: "1"
|
||||
CELERY_TASK_ACKS_LATE: "true"
|
||||
CELERY_WORKER_MAX_TASKS_PER_CHILD: "1000"
|
||||
TASK_TIME_LIMIT: "3600"
|
||||
TASK_SOFT_TIME_LIMIT: "3300"
|
||||
FILE_PROCESSING_TASK_TIME_LIMIT: "7200"
|
||||
FILE_PROCESSING_TASK_SOFT_TIME_LIMIT: "6300"
|
||||
CALLBACK_TASK_TIME_LIMIT: "3600"
|
||||
CALLBACK_TASK_SOFT_TIME_LIMIT: "3300"
|
||||
CELERY_TASK_DEFAULT_RETRY_DELAY: "60"
|
||||
CELERY_TASK_MAX_RETRIES: "3"
|
||||
CELERY_TASK_REJECT_ON_WORKER_LOST: "false"
|
||||
CELERY_WORKER_POOL_RESTARTS: "true"
|
||||
CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP: "true"
|
||||
CELERY_RESULT_CHORD_RETRY_INTERVAL: "3.0"
|
||||
API_DEPLOYMENT_WORKER_NAME: "api-deployment-worker"
|
||||
API_DEPLOYMENT_HEALTH_PORT: "8080"
|
||||
API_DEPLOYMENT_AUTOSCALE: "4,1"
|
||||
GENERAL_WORKER_NAME: "general-worker"
|
||||
GENERAL_HEALTH_PORT: "8081"
|
||||
GENERAL_AUTOSCALE: "6,2"
|
||||
FILE_PROCESSING_WORKER_NAME: "file-processing-worker"
|
||||
FILE_PROCESSING_HEALTH_PORT: "8082"
|
||||
FILE_PROCESSING_AUTOSCALE: "8,2"
|
||||
CALLBACK_WORKER_NAME: "callback-worker"
|
||||
CALLBACK_HEALTH_PORT: "8083"
|
||||
CALLBACK_AUTOSCALE: "4,1"
|
||||
SCHEDULER_WORKER_NAME: "scheduler-worker"
|
||||
SCHEDULER_HEALTH_PORT: "8087"
|
||||
SCHEDULER_AUTOSCALE: "2,1"
|
||||
NOTIFICATION_WORKER_NAME: "notification-worker"
|
||||
NOTIFICATION_HEALTH_PORT: "8085"
|
||||
NOTIFICATION_AUTOSCALE: "4,1"
|
||||
LOG_CONSUMER_WORKER_NAME: "log-consumer-worker"
|
||||
LOG_CONSUMER_HEALTH_PORT: "8086"
|
||||
LOG_CONSUMER_AUTOSCALE: "2,1"
|
||||
LOG_LEVEL: "INFO"
|
||||
DEFAULT_LOG_LEVEL: "INFO"
|
||||
WORKER_VERSION: "1.0.0"
|
||||
WORKER_INSTANCE_ID: "dev-01"
|
||||
ENABLE_LOG_HISTORY: "true"
|
||||
LOG_HISTORY_CONSUMER_INTERVAL: "30"
|
||||
LOGS_BATCH_LIMIT: "30"
|
||||
LOGS_EXPIRATION_TIME_IN_SECOND: "86400"
|
||||
LOG_HISTORY_QUEUE_NAME: "log_history_queue"
|
||||
LOG_QUEUE_MAX_SIZE: "10000"
|
||||
NOTIFICATION_QUEUE_NAME: "notifications"
|
||||
PLATFORM_SERVICE_HOST: "http://unstract-platform-service"
|
||||
PLATFORM_SERVICE_PORT: "3001"
|
||||
PROMPT_HOST: "http://unstract-prompt-service"
|
||||
PROMPT_PORT: "3003"
|
||||
X2TEXT_HOST: "http://unstract-x2text-service"
|
||||
X2TEXT_PORT: "3004"
|
||||
UNSTRACT_RUNNER_HOST: "http://unstract-runner"
|
||||
UNSTRACT_RUNNER_PORT: "5002"
|
||||
UNSTRACT_RUNNER_API_TIMEOUT: "300"
|
||||
UNSTRACT_RUNNER_API_RETRY_COUNT: "5"
|
||||
UNSTRACT_RUNNER_API_BACKOFF_FACTOR: "3"
|
||||
WORKFLOW_EXECUTION_FILE_STORAGE_CREDENTIALS: '{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
|
||||
API_FILE_STORAGE_CREDENTIALS: '{"provider": "minio", "credentials": {"endpoint_url": "http://unstract-minio:9000", "key": "minio", "secret": "minio123"}}'
|
||||
WORKFLOW_EXECUTION_DIR_PREFIX: "unstract/execution"
|
||||
API_EXECUTION_DIR_PREFIX: "unstract/api"
|
||||
MAX_PARALLEL_FILE_BATCHES: "1"
|
||||
FILE_EXECUTION_TRACKER_TTL_IN_SECOND: "18000"
|
||||
FILE_EXECUTION_TRACKER_COMPLETED_TTL_IN_SECOND: "300"
|
||||
DESTINATION_PROCESSING_STAGE_TTL_IN_SECOND: "600"
|
||||
DESTINATION_PROCESSING_LOCK_TTL_IN_SECOND: "10"
|
||||
EXECUTION_RESULT_TTL_SECONDS: "86400"
|
||||
EXECUTION_CACHE_TTL_SECONDS: "86400"
|
||||
INSTANT_WF_POLLING_TIMEOUT: "300"
|
||||
ACTIVE_FILE_CACHE_TTL: "300"
|
||||
POLL_NOT_FOUND_GRACE_PERIOD: "40"
|
||||
REDIS_RETRY_MAX_ATTEMPTS: "4"
|
||||
REDIS_RETRY_BACKOFF_FACTOR: "0.5"
|
||||
DEBUG: "false"
|
||||
TESTING: "false"
|
||||
ENABLE_METRICS: "true"
|
||||
ENABLE_FILE_HISTORY: "true"
|
||||
ENABLE_WEBHOOK_DELIVERY: "true"
|
||||
TOOL_REGISTRY_CONFIG_SRC_PATH: "/home/trav/apps/unstract/docker/tool_registry_config"
|
||||
TOOL_REGISTRY_STORAGE_CREDENTIALS: '{"provider":"local"}'
|
||||
HEALTH_CHECK_INTERVAL: "30"
|
||||
HEALTH_CHECK_TIMEOUT: "10"
|
||||
METRICS_PORT: "8080"
|
||||
CIRCUIT_BREAKER_FAILURE_THRESHOLD: "5"
|
||||
CIRCUIT_BREAKER_RECOVERY_TIMEOUT: "60"
|
||||
NOTIFICATION_TIMEOUT: "5"
|
||||
CACHE_TTL_SEC: "10800"
|
||||
CONNECTION_POOL_SIZE: "10"
|
||||
CONNECTION_POOL_MAX_OVERFLOW: "20"
|
||||
ENABLE_PRIORITY_ROUTING: "false"
|
||||
HIGH_PRIORITY_QUEUE_SUFFIX: "_high"
|
||||
LOW_PRIORITY_QUEUE_SUFFIX: "_low"
|
||||
ENABLE_TASK_BACKUP: "false"
|
||||
BACKUP_INTERVAL: "3600"
|
||||
ENABLE_DESTINATION_CONNECTORS: "true"
|
||||
ENABLE_CLEANUP_TASKS: "true"
|
||||
SECURE_SSL_REDIRECT: "false"
|
||||
SESSION_COOKIE_SECURE: "false"
|
||||
CSRF_COOKIE_SECURE: "false"
|
||||
SENTRY_DSN: ""
|
||||
SENTRY_ENVIRONMENT: "development"
|
||||
GDRIVE_GOOGLE_SERVICE_ACCOUNT: ""
|
||||
GDRIVE_GOOGLE_PROJECT_ID: ""
|
||||
GOOGLE_STORAGE_ACCESS_KEY_ID: ""
|
||||
GOOGLE_STORAGE_SECRET_ACCESS_KEY: ""
|
||||
GOOGLE_STORAGE_BASE_URL: "https://storage.googleapis.com"
|
||||
SOCIAL_AUTH_EXTRA_DATA_EXPIRATION_TIME_IN_SECOND: "3600"
|
||||
GOOGLE_OAUTH2_KEY: ""
|
||||
GOOGLE_OAUTH2_SECRET: ""
|
||||
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: "python"
|
||||
|
||||
services:
|
||||
# Backend service
|
||||
backend:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-backend
|
||||
restart: unless-stopped
|
||||
command: --migrate
|
||||
expose:
|
||||
- "8000"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
# - reverse-proxy
|
||||
- minio
|
||||
- minio-bootstrap
|
||||
- platform-service
|
||||
- prompt-service
|
||||
- x2text-service
|
||||
volumes:
|
||||
- prompt_studio_data:/app/prompt-studio-data
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
environment:
|
||||
<<: *backend_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-backend"
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.backend.rule=Host(`unstract.toy`) && PathPrefix(`/api/v1`, `/deployment`)
|
||||
- traefik.http.services.backend.loadbalancer.server.port=8000
|
||||
# WebSocket support
|
||||
- traefik.http.middlewares.backend-ws.headers.customrequestheaders.Connection=Upgrade
|
||||
- traefik.http.middlewares.backend-ws.headers.customrequestheaders.Upgrade=websocket
|
||||
- traefik.http.routers.backend.middlewares=backend-ws
|
||||
extra_hosts:
|
||||
# "host-gateway" is a special string that translates to host docker0 i/f IP.
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- dokploy-network
|
||||
- default
|
||||
|
||||
# Celery default worker
|
||||
worker:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-worker
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend worker --loglevel=info -Q celery,celery_api_deployments --autoscale=${WORKER_AUTOSCALE}"
|
||||
depends_on:
|
||||
- rabbitmq
|
||||
- db
|
||||
environment:
|
||||
<<: *backend_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v1
|
||||
|
||||
# Celery worker for managing logs and periodic tasks
|
||||
worker-logging:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-worker-logging
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend worker --loglevel=info -Q celery_periodic_logs,celery_log_task_queue --autoscale=${WORKER_LOGGING_AUTOSCALE}"
|
||||
depends_on:
|
||||
- rabbitmq
|
||||
- db
|
||||
environment:
|
||||
<<: *backend_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-logging"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
profiles:
|
||||
- workers-v1
|
||||
|
||||
# Celery worker for handling file processing tasks
|
||||
worker-file-processing:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-worker-file-processing
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend.workers.file_processing worker --loglevel=info -Q file_processing,api_file_processing --autoscale=${WORKER_FILE_PROCESSING_AUTOSCALE}"
|
||||
depends_on:
|
||||
- rabbitmq
|
||||
- db
|
||||
environment:
|
||||
<<: *backend_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-file-processing"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v1
|
||||
|
||||
worker-file-processing-callback:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-worker-file-processing-callback
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend.workers.file_processing_callback worker --loglevel=info -Q file_processing_callback,api_file_processing_callback --autoscale=${WORKER_FILE_PROCESSING_CALLBACK_AUTOSCALE}"
|
||||
depends_on:
|
||||
- rabbitmq
|
||||
- db
|
||||
environment:
|
||||
<<: *backend_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-file-processing-callback"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v1
|
||||
|
||||
# Celery Flower
|
||||
celery-flower:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-celery-flower
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend flower --port=5555 --purge_offline_workers=5"
|
||||
depends_on:
|
||||
- worker
|
||||
- worker-logging
|
||||
- rabbitmq
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
# ports:
|
||||
# - "5555:5555"
|
||||
expose:
|
||||
- "5555"
|
||||
environment:
|
||||
<<: *backend_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-celery-flower"
|
||||
volumes:
|
||||
- unstract_data:/data
|
||||
profiles:
|
||||
- optional
|
||||
|
||||
# Celery Beat
|
||||
celery-beat:
|
||||
image: unstract/backend:${VERSION}
|
||||
container_name: unstract-celery-beat
|
||||
restart: unless-stopped
|
||||
entrypoint: .venv/bin/celery
|
||||
command: "-A backend beat --scheduler django_celery_beat.schedulers:DatabaseScheduler -l INFO"
|
||||
depends_on:
|
||||
- db
|
||||
- rabbitmq
|
||||
environment:
|
||||
<<:
|
||||
- *backend_env
|
||||
- *essentials_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-celery-beat"
|
||||
|
||||
# Frontend React app
|
||||
frontend:
|
||||
image: unstract/frontend:${VERSION}
|
||||
container_name: unstract-frontend
|
||||
restart: unless-stopped
|
||||
# ports:
|
||||
# - "3000:80"
|
||||
#
|
||||
expose:
|
||||
- "80"
|
||||
depends_on:
|
||||
- backend
|
||||
# - reverse-proxy
|
||||
environment:
|
||||
- ENVIRONMENT=development
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.frontend.rule=Host(`unstract.toy`) && !PathPrefix(`/api/v1`, `/deployment`)
|
||||
- traefik.http.services.frontend.loadbalancer.server.port=80
|
||||
networks:
|
||||
- dokploy-network
|
||||
- default
|
||||
|
||||
platform-service:
|
||||
image: unstract/platform-service:${VERSION}
|
||||
container_name: unstract-platform-service
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "3001"
|
||||
environment:
|
||||
<<: *platform_service_env
|
||||
depends_on:
|
||||
- redis
|
||||
- db
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
prompt-service:
|
||||
image: unstract/prompt-service:${VERSION}
|
||||
container_name: unstract-prompt-service
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
- minio
|
||||
- minio-bootstrap
|
||||
- rabbitmq
|
||||
expose:
|
||||
- "3003"
|
||||
environment:
|
||||
<<: *prompt_service_env
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
extra_hosts:
|
||||
# "host-gateway" is a special string that translates to host docker0 i/f IP.
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
x2text-service:
|
||||
image: unstract/x2text-service:${VERSION}
|
||||
container_name: unstract-x2text-service
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "3004"
|
||||
environment:
|
||||
<<: *x2text_service_env
|
||||
depends_on:
|
||||
- db
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
networks:
|
||||
- structnet
|
||||
- default
|
||||
|
||||
runner:
|
||||
image: unstract/runner:${VERSION}
|
||||
container_name: unstract-runner
|
||||
restart: unless-stopped
|
||||
# ports:
|
||||
# - 5002:5002
|
||||
expose:
|
||||
- "5002"
|
||||
environment:
|
||||
<<: *runner_env
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
# Docker socket bind mount to spawn tool containers
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /home/trav/.secrets/registry.txt:/run/secrets/registry.txt:ro
|
||||
depends_on:
|
||||
- redis
|
||||
- rabbitmq
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
# ====================================================================
|
||||
# V2 DEDICATED WORKER SERVICES (opt-in with --workers-v2 flag)
|
||||
# ====================================================================
|
||||
|
||||
worker-api-deployment-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-api-deployment-v2
|
||||
restart: unless-stopped
|
||||
command: ["api-deployment"]
|
||||
ports:
|
||||
- "8085:8090"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
<<:
|
||||
- *workers_env
|
||||
- *essentials_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-api-deployment-v2"
|
||||
WORKER_TYPE: "api_deployment"
|
||||
CELERY_QUEUES_API_DEPLOYMENT: "${CELERY_QUEUES_API_DEPLOYMENT:-celery_api_deployments}"
|
||||
CELERY_POOL: "${WORKER_API_DEPLOYMENT_POOL:-threads}"
|
||||
CELERY_PREFETCH_MULTIPLIER: "${WORKER_API_DEPLOYMENT_PREFETCH_MULTIPLIER:-1}"
|
||||
CELERY_CONCURRENCY: "${WORKER_API_DEPLOYMENT_CONCURRENCY:-4}"
|
||||
CELERY_EXTRA_ARGS: "${WORKER_API_DEPLOYMENT_EXTRA_ARGS:-}"
|
||||
WORKER_NAME: "api-deployment-worker-v2"
|
||||
API_DEPLOYMENT_METRICS_PORT: "8090"
|
||||
HEALTH_PORT: "8090"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-callback-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-callback-v2
|
||||
restart: unless-stopped
|
||||
command: ["callback"]
|
||||
ports:
|
||||
- "8086:8083"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
<<:
|
||||
- *workers_env
|
||||
- *essentials_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-callback-v2"
|
||||
WORKER_TYPE: "callback"
|
||||
WORKER_NAME: "callback-worker-v2"
|
||||
CALLBACK_METRICS_PORT: "8083"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-file-processing-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-file-processing-v2
|
||||
restart: unless-stopped
|
||||
# command: ["file-processing"]
|
||||
command:
|
||||
[
|
||||
".venv/bin/celery",
|
||||
"-A",
|
||||
"worker",
|
||||
"worker",
|
||||
"--queues=file_processing,api_file_processing,file_processing_priority",
|
||||
"--loglevel=INFO",
|
||||
"--pool=prefork",
|
||||
"--concurrency=4",
|
||||
"--prefetch-multiplier=1",
|
||||
"--without-gossip",
|
||||
"--without-mingle",
|
||||
"--without-heartbeat",
|
||||
]
|
||||
ports:
|
||||
- "8087:8082"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
<<:
|
||||
- *workers_env
|
||||
- *essentials_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-file-processing-v2"
|
||||
WORKER_TYPE: "file_processing"
|
||||
WORKER_MODE: "oss"
|
||||
WORKER_NAME: "file-processing-worker-v2"
|
||||
FILE_PROCESSING_METRICS_PORT: "8082"
|
||||
# OSS Configuration - Enterprise features disabled
|
||||
MANUAL_REVIEW_ENABLED: "false"
|
||||
ENTERPRISE_FEATURES_ENABLED: "false"
|
||||
PLUGIN_REGISTRY_MODE: "oss"
|
||||
# Configurable Celery options
|
||||
CELERY_QUEUES_FILE_PROCESSING: "${CELERY_QUEUES_FILE_PROCESSING:-file_processing,api_file_processing}"
|
||||
CELERY_POOL: "${WORKER_FILE_PROCESSING_POOL:-threads}"
|
||||
CELERY_PREFETCH_MULTIPLIER: "${WORKER_FILE_PROCESSING_PREFETCH_MULTIPLIER:-1}"
|
||||
CELERY_CONCURRENCY: "${WORKER_FILE_PROCESSING_CONCURRENCY:-4}"
|
||||
CELERY_EXTRA_ARGS: "${WORKER_FILE_PROCESSING_EXTRA_ARGS:-}"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-general-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-general-v2
|
||||
restart: unless-stopped
|
||||
command: ["general"]
|
||||
ports:
|
||||
- "8088:8082"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
<<:
|
||||
- *workers_env
|
||||
- *essentials_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-general-v2"
|
||||
WORKER_TYPE: "general"
|
||||
WORKER_NAME: "general-worker-v2"
|
||||
GENERAL_METRICS_PORT: "8081"
|
||||
HEALTH_PORT: "8082"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-notification-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-notification-v2
|
||||
restart: unless-stopped
|
||||
command: ["notification"]
|
||||
ports:
|
||||
- "8089:8085"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
<<:
|
||||
- *workers_env
|
||||
- *essentials_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-notification-v2"
|
||||
WORKER_TYPE: "notification"
|
||||
WORKER_NAME: "notification-worker-v2"
|
||||
NOTIFICATION_METRICS_PORT: "8085"
|
||||
HEALTH_PORT: "8085"
|
||||
# Notification specific configs
|
||||
NOTIFICATION_QUEUE_NAME: "notifications"
|
||||
WEBHOOK_QUEUE_NAME: "notifications_webhook"
|
||||
EMAIL_QUEUE_NAME: "notifications_email"
|
||||
SMS_QUEUE_NAME: "notifications_sms"
|
||||
PRIORITY_QUEUE_NAME: "notifications_priority"
|
||||
# Configurable Celery options
|
||||
CELERY_QUEUES_NOTIFICATION: "${CELERY_QUEUES_NOTIFICATION:-notifications,notifications_webhook,notifications_email,notifications_sms,notifications_priority}"
|
||||
CELERY_POOL: "${WORKER_NOTIFICATION_POOL:-prefork}"
|
||||
CELERY_PREFETCH_MULTIPLIER: "${WORKER_NOTIFICATION_PREFETCH_MULTIPLIER:-1}"
|
||||
CELERY_CONCURRENCY: "${WORKER_NOTIFICATION_CONCURRENCY:-4}"
|
||||
CELERY_EXTRA_ARGS: "${WORKER_NOTIFICATION_EXTRA_ARGS:-}"
|
||||
# Complete command override (if set, ignores all other options)
|
||||
CELERY_COMMAND_OVERRIDE: "${WORKER_NOTIFICATION_COMMAND_OVERRIDE:-}"
|
||||
# Individual argument overrides
|
||||
CELERY_APP_MODULE: "${WORKER_NOTIFICATION_APP_MODULE:-worker}"
|
||||
CELERY_LOG_LEVEL: "${WORKER_NOTIFICATION_LOG_LEVEL:-INFO}"
|
||||
CELERY_HOSTNAME: "${WORKER_NOTIFICATION_HOSTNAME:-}"
|
||||
CELERY_MAX_TASKS_PER_CHILD: "${WORKER_NOTIFICATION_MAX_TASKS_PER_CHILD:-}"
|
||||
CELERY_TIME_LIMIT: "${WORKER_NOTIFICATION_TIME_LIMIT:-}"
|
||||
CELERY_SOFT_TIME_LIMIT: "${WORKER_NOTIFICATION_SOFT_TIME_LIMIT:-}"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/dockerworkflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-log-consumer-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-log-consumer-v2
|
||||
restart: unless-stopped
|
||||
command: ["log-consumer"]
|
||||
ports:
|
||||
- "8090:8084"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
<<:
|
||||
- *workers_env
|
||||
- *essentials_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-log-consumer-v2"
|
||||
WORKER_TYPE: "log_consumer"
|
||||
WORKER_NAME: "log-consumer-worker-v2"
|
||||
LOG_CONSUMER_METRICS_PORT: "8084"
|
||||
HEALTH_PORT: "8084"
|
||||
# Log consumer specific configs
|
||||
LOG_CONSUMER_QUEUE_NAME: "celery_log_task_queue"
|
||||
# Multiple queue support - supports comma-separated queue names
|
||||
CELERY_QUEUES_LOG_CONSUMER: "${CELERY_QUEUES_LOG_CONSUMER:-celery_log_task_queue,celery_periodic_logs}"
|
||||
PERIODIC_LOGS_QUEUE_NAME: "${PERIODIC_LOGS_QUEUE_NAME:-celery_periodic_logs}"
|
||||
# Log history configuration
|
||||
LOG_HISTORY_QUEUE_NAME: "${LOG_HISTORY_QUEUE_NAME:-log_history_queue}"
|
||||
LOGS_BATCH_LIMIT: "${LOGS_BATCH_LIMIT:-100}"
|
||||
ENABLE_LOG_HISTORY: "${ENABLE_LOG_HISTORY:-true}"
|
||||
CELERY_POOL: "${WORKER_LOG_CONSUMER_POOL:-prefork}"
|
||||
CELERY_PREFETCH_MULTIPLIER: "${WORKER_LOG_CONSUMER_PREFETCH_MULTIPLIER:-1}"
|
||||
CELERY_CONCURRENCY: "${WORKER_LOG_CONSUMER_CONCURRENCY:-2}"
|
||||
CELERY_EXTRA_ARGS: "${WORKER_LOG_CONSUMER_EXTRA_ARGS:-}"
|
||||
# Complete command override (if set, ignores all other options)
|
||||
CELERY_COMMAND_OVERRIDE: "${WORKER_LOG_CONSUMER_COMMAND_OVERRIDE:-}"
|
||||
# Individual argument overrides
|
||||
CELERY_APP_MODULE: "${WORKER_LOG_CONSUMER_APP_MODULE:-worker}"
|
||||
CELERY_LOG_LEVEL: "${WORKER_LOG_CONSUMER_LOG_LEVEL:-INFO}"
|
||||
CELERY_HOSTNAME: "${WORKER_LOG_CONSUMER_HOSTNAME:-}"
|
||||
CELERY_MAX_TASKS_PER_CHILD: "${WORKER_LOG_CONSUMER_MAX_TASKS_PER_CHILD:-}"
|
||||
CELERY_TIME_LIMIT: "${WORKER_LOG_CONSUMER_TIME_LIMIT:-}"
|
||||
CELERY_SOFT_TIME_LIMIT: "${WORKER_LOG_CONSUMER_SOFT_TIME_LIMIT:-}"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-log-history-scheduler-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-log-history-scheduler-v2
|
||||
restart: unless-stopped
|
||||
entrypoint: ["/bin/bash"]
|
||||
command: ["/app/log_consumer/scheduler.sh"]
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
<<:
|
||||
- *workers_env
|
||||
- *essentials_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-log-history-scheduler-v2"
|
||||
# Scheduler interval in seconds
|
||||
LOG_HISTORY_CONSUMER_INTERVAL: "${LOG_HISTORY_CONSUMER_INTERVAL:-5}"
|
||||
# Override example: TASK_TRIGGER_COMMAND=/custom/trigger/script.sh
|
||||
TASK_TRIGGER_COMMAND: "${TASK_TRIGGER_COMMAND:-}"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
worker-scheduler-v2:
|
||||
image: unstract/worker-unified:${VERSION}
|
||||
container_name: unstract-worker-scheduler-v2
|
||||
restart: unless-stopped
|
||||
command: ["scheduler"]
|
||||
ports:
|
||||
- "8091:8087"
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- rabbitmq
|
||||
environment:
|
||||
<<:
|
||||
- *workers_env
|
||||
- *essentials_env
|
||||
ENVIRONMENT: "development"
|
||||
APPLICATION_NAME: "unstract-worker-scheduler-v2"
|
||||
WORKER_TYPE: "scheduler"
|
||||
WORKER_NAME: "scheduler-worker-v2"
|
||||
SCHEDULER_METRICS_PORT: "8087"
|
||||
HEALTH_PORT: "8087"
|
||||
# Scheduler specific configs
|
||||
SCHEDULER_QUEUE_NAME: "scheduler"
|
||||
# Configurable Celery options
|
||||
CELERY_QUEUES_SCHEDULER: "${CELERY_QUEUES_SCHEDULER:-scheduler}"
|
||||
CELERY_POOL: "${WORKER_SCHEDULER_POOL:-prefork}"
|
||||
CELERY_PREFETCH_MULTIPLIER: "${WORKER_SCHEDULER_PREFETCH_MULTIPLIER:-1}"
|
||||
CELERY_CONCURRENCY: "${WORKER_SCHEDULER_CONCURRENCY:-2}"
|
||||
CELERY_EXTRA_ARGS: "${WORKER_SCHEDULER_EXTRA_ARGS:-}"
|
||||
# Complete command override (if set, ignores all other options)
|
||||
CELERY_COMMAND_OVERRIDE: "${WORKER_SCHEDULER_COMMAND_OVERRIDE:-}"
|
||||
# Individual argument overrides
|
||||
CELERY_APP_MODULE: "${WORKER_SCHEDULER_APP_MODULE:-worker}"
|
||||
CELERY_LOG_LEVEL: "${WORKER_SCHEDULER_LOG_LEVEL:-INFO}"
|
||||
CELERY_HOSTNAME: "${WORKER_SCHEDULER_HOSTNAME:-}"
|
||||
CELERY_MAX_TASKS_PER_CHILD: "${WORKER_SCHEDULER_MAX_TASKS_PER_CHILD:-}"
|
||||
CELERY_TIME_LIMIT: "${WORKER_SCHEDULER_TIME_LIMIT:-}"
|
||||
CELERY_SOFT_TIME_LIMIT: "${WORKER_SCHEDULER_SOFT_TIME_LIMIT:-}"
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
volumes:
|
||||
- /home/trav/apps/unstract/docker/workflow_data:/data
|
||||
- ${TOOL_REGISTRY_CONFIG_SRC_PATH}:/data/tool_registry_config
|
||||
profiles:
|
||||
- workers-v2
|
||||
|
||||
volumes:
|
||||
prompt_studio_data:
|
||||
unstract_data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
# NOTE:
|
||||
# Any changes need to be reflected in proxy service too.
|
||||
name: unstract-network
|
||||
structnet:
|
||||
external: true
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user