diff --git a/compose/.env-release b/compose/.env-release index 637cf58..381acdb 100644 --- a/compose/.env-release +++ b/compose/.env-release @@ -1,5 +1,5 @@ # components to be used; IMPORTANT: there should be no space between the files names ! -COMPOSE_FILE='caddy.yml,seatable-server.yml' +COMPOSE_FILE='caddy.yml,seatable-server.yml,dtable-server.yml,automation-worker.yml' COMPOSE_PATH_SEPARATOR=',' # system settings diff --git a/compose/automation-worker.yml b/compose/automation-worker.yml new file mode 100644 index 0000000..d69803d --- /dev/null +++ b/compose/automation-worker.yml @@ -0,0 +1,41 @@ +services: + automation-worker: + image: ${AUTOMATION_WORKER_IMAGE:-} + restart: unless-stopped + container_name: automation-worker + volumes: + - /opt/seatable-server:/shared + environment: + - SEATABLE_MYSQL_DB_HOST=${MARIADB_HOST:-mariadb} + - SEATABLE_MYSQL_DB_PORT=${MARIADB_PORT:-3306} + - SEATABLE_MYSQL_DB_USER=root + - SEATABLE_MYSQL_DB_PASSWORD=${MARIADB_PASSWORD:?Variable is not set or empty} + - SEATABLE_MYSQL_DB_DTABLE_DB_NAME=dtable_db + - SEATABLE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db + - SEATABLE_MYSQL_DB_CCNET_DB_NAME=ccnet_db + - REDIS_HOST=${REDIS_HOST:-redis} + - REDIS_PORT=${REDIS_PORT:-6379} + - REDIS_PASSWORD=${REDIS_PASSWORD:?Variable is not set or empty} + - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty} + - SECRET_KEY=${SECRET_KEY:?Variable is not set or empty} + - SEATABLE_SERVER_HOSTNAME=${SEATABLE_SERVER_HOSTNAME:?Variable is not set or empty} + - SEATABLE_SERVER_PROTOCOL=${SEATABLE_SERVER_PROTOCOL:-https} + - TZ=${TIME_ZONE:?Variable is not set or empty} + - INNER_DTABLE_WEB_SERVICE_URL=${INNER_DTABLE_WEB_SERVICE_URL:-http://seatable-server:80} + - INNER_DTABLE_SERVER_URL=${INNER_DTABLE_SERVER_URL:-http://dtable-server:5000} + - INNER_DTABLE_DB_URL=${INNER_DTABLE_DB_URL:-http://seatable-server:7777} + - ENABLE_PYTHON_SCRIPT=${ENABLE_PYTHON_SCRIPT:-false} + - PYTHON_SCHEDULER_URL=${PYTHON_SCHEDULER_URL:-http://python-scheduler} + - PYTHON_SCHEDULER_AUTH_TOKEN=${PYTHON_SCHEDULER_AUTH_TOKEN:-} + - ENABLE_SEATABLE_AI=${ENABLE_SEATABLE_AI:-false} + - INNER_SEATABLE_AI_SERVER_URL=${INNER_SEATABLE_AI_SERVER_URL:-http://seatable-ai:8888} + - SEATABLE_LOG_TO_STDOUT=true + - LOG_LEVEL=${LOG_LEVEL:-INFO} + - STORAGE_TYPE=disk + depends_on: + mariadb: + condition: service_healthy + redis: + condition: service_healthy + networks: + - backend-seatable-net diff --git a/compose/config/seatable-nginx.conf b/compose/config/seatable-nginx.conf index d132e3e..cb7fe73 100644 --- a/compose/config/seatable-nginx.conf +++ b/compose/config/seatable-nginx.conf @@ -110,13 +110,4 @@ server { location /dtable-db { return 404 'This endpoint is deprecated. Please migrate to the API Gateway: https://forum.seatable.com/t/important-changes-to-the-seatable-cloud-api-in-version-5-3/6677'; } - - # ping endpoints - location = /dtable-server/ping/ { - proxy_pass http://127.0.0.1:5000/ping/; - } - - location = /dtable-db/ping/ { - proxy_pass http://127.0.0.1:7777/ping/; - } } diff --git a/compose/dtable-server.yml b/compose/dtable-server.yml new file mode 100644 index 0000000..704537c --- /dev/null +++ b/compose/dtable-server.yml @@ -0,0 +1,42 @@ +services: + dtable-server: + image: ${DTABLE_SERVER_IMAGE:-} + restart: unless-stopped + container_name: dtable-server + volumes: + - /opt/seatable-server:/shared + - type: bind + source: ./seatable-license.txt + target: /shared/seatable/seatable-license.txt + read_only: ${SEATABLE_LICENSE_FORCE_READ_ONLY:-false} + bind: + create_host_path: false + environment: + - SEATABLE_MYSQL_DB_HOST=${MARIADB_HOST:-mariadb} + - SEATABLE_MYSQL_DB_PORT=${MARIADB_PORT:-3306} + - SEATABLE_MYSQL_DB_USER=root + - SEATABLE_MYSQL_DB_PASSWORD=${MARIADB_PASSWORD:?Variable is not set or empty} + - SEATABLE_MYSQL_DB_DTABLE_DB_NAME=dtable_db + - REDIS_HOST=${REDIS_HOST:-redis} + - REDIS_PORT=${REDIS_PORT:-6379} + - REDIS_PASSWORD=${REDIS_PASSWORD:?Variable is not set or empty} + - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty} + - TZ=${TIME_ZONE:?Variable is not set or empty} + - INNER_DTABLE_WEB_SERVICE_URL=${INNER_DTABLE_WEB_SERVICE_URL:-http://seatable-server:80} + - INNER_DTABLE_DB_URL=${INNER_DTABLE_DB_URL:-http://seatable-server:7777} + - LOG_LEVEL=${LOG_LEVEL:-INFO} + depends_on: + mariadb: + condition: service_healthy + redis: + condition: service_healthy + seatable-server: + condition: service_healthy + networks: + - backend-seatable-net + healthcheck: + test: ["CMD-SHELL", "curl --fail http://localhost:5000/ping || exit 1"] + interval: 20s + retries: 3 + start_period: 30s + timeout: 10s diff --git a/compose/python-pipeline.yml b/compose/python-pipeline.yml index 77b8660..32dcc24 100644 --- a/compose/python-pipeline.yml +++ b/compose/python-pipeline.yml @@ -91,11 +91,15 @@ services: # Docker-Compose does not seem to create networks that are not used by any containers in the compose file(s) - runner-net - # Override ENABLE_PYTHON_SCRIPT for seatable-server + # Override ENABLE_PYTHON_SCRIPT for seatable-server and automation-worker seatable-server: environment: - ENABLE_PYTHON_SCRIPT=true + automation-worker: + environment: + - ENABLE_PYTHON_SCRIPT=true + networks: frontend-net: name: frontend-net diff --git a/compose/seatable-server.yml b/compose/seatable-server.yml index 5b3d391..57bd8e0 100644 --- a/compose/seatable-server.yml +++ b/compose/seatable-server.yml @@ -52,6 +52,7 @@ services: - LOG_LEVEL=${LOG_LEVEL:-INFO} - ENABLE_SEATABLE_AI=${ENABLE_SEATABLE_AI:-false} - INNER_SEATABLE_AI_SERVER_URL=${INNER_SEATABLE_AI_SERVER_URL:-http://seatable-ai:8888} + - INNER_DTABLE_SERVER_URL=http://dtable-server:5000 labels: caddy_0: ${SEATABLE_SERVER_PROTOCOL:-https}://${SEATABLE_SERVER_HOSTNAME:?Variable is not set or empty} caddy_0.reverse_proxy: "{{upstreams 80}}" @@ -126,7 +127,7 @@ services: image: ${SEATABLE_DB_IMAGE:-mariadb:11.8.5-noble} restart: unless-stopped container_name: mariadb - command: ["mariadbd", "--innodb_snapshot_isolation=OFF"] + command: ["mariadbd", "--innodb_snapshot_isolation=OFF", "--max-allowed-packet=32M"] environment: - MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD:-${MARIADB_PASSWORD}} - MYSQL_LOG_CONSOLE=true