Add bot and tryton_mcp services with environment configuration

This commit is contained in:
2026-04-03 12:52:06 -05:00
parent 19026744dc
commit f8a093a7d5
2 changed files with 82 additions and 16 deletions

View File

@@ -1,5 +1,7 @@
# Naliia # Naliia Images
NALIIA_IMAGE="gitea.onecluster.org/oneteam/naliia:1.0.0_pro" NALIIA = "gitea.onecluster.org/oneteam/naliia:1.0.0_pro"
NALIIA_BOT = "gitea.onecluster.org/oneteam/naliia_bot:v1.0.0_pro"
NALIIA_TRYTON_MCP = "gitea.onecluster.org/oneteam/naliia_tryton_mcp:v1.0.0_pro"
# Tryton # Tryton
EMAIL="admin@admin.org" EMAIL="admin@admin.org"
@@ -12,6 +14,19 @@ POSTGRES_USER="postgres"
POSTGRES_PASSWORD="SUp3r-pass*DB" POSTGRES_PASSWORD="SUp3r-pass*DB"
TRYTOND_DATABASE_URI="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOSTNAME}:5432/" TRYTOND_DATABASE_URI="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOSTNAME}:5432/"
# Bot
DEEPSEEK_API_KEY="sk-..."
ANTHROPIC_API_KEY="sk-..."
# MCP
TRYTON_HOSTNAME="tryton"
TRYTON_DATABASE=${POSTGRES_DB}
TRYTON_USERNAME="admin"
TRYTON_PASSWORD="S0p0rt3f1n4l*"
TRYTON_PORT=8000
MCP_PORT=3001
# SMTP # SMTP
SMTP="True" SMTP="True"
SMTP_TYPE="smtps+ssl" SMTP_TYPE="smtps+ssl"

View File

@@ -16,7 +16,7 @@ services:
- .env - .env
tryton: tryton:
image: ${NALIIA_IMAGE} image: ${NALIIA}
working_dir: /app working_dir: /app
command: /bin/bash /opt/start.sh command: /bin/bash /opt/start.sh
volumes: volumes:
@@ -24,7 +24,7 @@ services:
- attachment:/mnt/attachment - attachment:/mnt/attachment
environment: environment:
TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://${POSTGRES_USER:-naliia}:${POSTGRES_PASSWORD:-SUp3r-pass*DB}@${DB_HOSTNAME:-db}:5432/} TRYTOND_DATABASE_URI: ${TRYTOND_DATABASE_URI:-postgresql://${POSTGRES_USER:-naliia}:${POSTGRES_PASSWORD:-SUp3r-pass*DB}@${DB_HOSTNAME:-db}:5432/}
NALIIA_IMAGE: ${NALIIA_IMAGE:-gitea.onecluster.org/aserrador/naliia:latest} NALIIA_IMAGE: ${NALIIA:-gitea.onecluster.org/aserrador/naliia:latest}
EMAIL: ${EMAIL:-admin@admin.org} EMAIL: ${EMAIL:-admin@admin.org}
depends_on: depends_on:
db: db:
@@ -39,14 +39,19 @@ services:
- .env - .env
worker: worker:
image: ${NALIIA_IMAGE} image: ${NALIIA}
working_dir: /app working_dir: /app
depends_on: depends_on:
tryton: tryton:
condition: service_healthy condition: service_healthy
db: db:
condition: service_healthy condition: service_healthy
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-worker -c /etc/trytond_worker.conf -d ${POSTGRES_DB} --logconf /etc/trytond_worker_logging.conf"] entrypoint:
[
"bash",
"-c",
"/entrypoint.sh trytond-worker -c /etc/trytond_worker.conf -d ${POSTGRES_DB} --logconf /etc/trytond_worker_logging.conf",
]
volumes: volumes:
- .:/app - .:/app
environment: environment:
@@ -55,14 +60,19 @@ services:
- .env - .env
cron: cron:
image: ${NALIIA_IMAGE} image: ${NALIIA}
working_dir: /app working_dir: /app
depends_on: depends_on:
tryton: tryton:
condition: service_healthy condition: service_healthy
db: db:
condition: service_healthy condition: service_healthy
entrypoint: [ "bash", "-c", "/entrypoint.sh trytond-cron -c /etc/trytond.conf -d ${POSTGRES_DB} --logconf /etc/trytond_cron_logging.conf"] entrypoint:
[
"bash",
"-c",
"/entrypoint.sh trytond-cron -c /etc/trytond.conf -d ${POSTGRES_DB} --logconf /etc/trytond_cron_logging.conf",
]
volumes: volumes:
- .:/app - .:/app
environment: environment:
@@ -82,7 +92,48 @@ services:
- db - db
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/nginx.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" command: /bin/bash -c "envsubst < /etc/nginx/conf.d/nginx.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
bot:
image: ${NALIIA_BOT}
ports:
- "8010:8010"
depends_on:
db:
condition: service_healthy
volumes:
- bot:/app/src
env_file:
- .env
environment:
- LLM_MODEL=${LLM_MODEL:-deepseek}
- POSTGRES_HOST=${POSTGRES_HOST:-db}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-messages}
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8010/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
tryton_mcp:
image: ${NALIIA_TRYTON_MCP}
volumes:
- mcp:/app/src
environment:
- TRYTON_HOSTNAME=${TRYTON_HOSTNAME:-tryton}
- TRYTON_DATABASE=${TRYTON_DATABASE:-naliia}
- TRYTON_USERNAME=${TRYTON_USERNAME:-admin}
- TRYTON_PASSWORD=${TRYTON_PASSWORD:-S0p0rt3f1n4l*}
- TRYTON_PORT=${TRYTON_PORT:-8000}
- FASTMCP_HOST=0.0.0.0
- FASTMCP_TRANSPORT=http
- FASTMCP_PORT=3001
env_file:
- .env
volumes: volumes:
postgres: postgres:
var: var:
attachment: attachment:
bot:
mcp: