feat: add openclaw service to docker compose
This commit is contained in:
15
.env.example
15
.env.example
@@ -13,9 +13,20 @@ BETTER_AUTH_BASE_URL=https://fiscal.b11studio.xyz
|
||||
BETTER_AUTH_TRUSTED_ORIGINS=https://fiscal.b11studio.xyz
|
||||
|
||||
# OpenClaw / ZeroClaw (OpenAI-compatible)
|
||||
OPENCLAW_BASE_URL=http://localhost:4000
|
||||
OPENCLAW_API_KEY=replace-with-your-agent-key
|
||||
# Leave empty to use internal `openclaw` Compose service (`http://openclaw:4000`).
|
||||
# Set this only when targeting an external OpenClaw endpoint.
|
||||
OPENCLAW_BASE_URL=
|
||||
OPENCLAW_API_KEY=
|
||||
OPENCLAW_MODEL=zeroclaw
|
||||
OPENCLAW_AUTH_MODE=none
|
||||
OPENCLAW_PORT=4000
|
||||
|
||||
# OpenClaw container source for Docker Compose
|
||||
OPENCLAW_IMAGE=coolify-zeroclaw:local
|
||||
# If this repo is private, include credentials in the URL:
|
||||
# OPENCLAW_BUILD_CONTEXT=https://<username>:<token>@gitea-hs848cs8kgs840o8c8s8cwkk.b11studio.xyz/Francy51/coolify_ZeroClaw.git
|
||||
OPENCLAW_BUILD_CONTEXT=https://gitea-hs848cs8kgs840o8c8s8cwkk.b11studio.xyz/Francy51/coolify_ZeroClaw.git
|
||||
OPENCLAW_DOCKERFILE=Dockerfile
|
||||
|
||||
# SEC API etiquette
|
||||
SEC_USER_AGENT=Fiscal Clone <support@fiscal.local>
|
||||
|
||||
15
README.md
15
README.md
@@ -44,7 +44,10 @@ cp .env.example .env
|
||||
docker compose up --build -d
|
||||
```
|
||||
|
||||
For local Docker, host port mapping comes from `docker-compose.override.yml` (default `http://localhost:3000`, configurable via `APP_PORT`).
|
||||
For local Docker, host port mapping comes from `docker-compose.override.yml` (default `http://localhost:3000` via `APP_PORT`, and `http://localhost:4000` for OpenClaw via `OPENCLAW_PORT`).
|
||||
OpenClaw is included as a Compose service (`openclaw`) and is built by default from `OPENCLAW_BUILD_CONTEXT` (set to `Francy51/coolify_ZeroClaw` in `.env.example`).
|
||||
If that Gitea repo is private, set `OPENCLAW_BUILD_CONTEXT` with embedded credentials (`https://<username>:<token>@.../coolify_ZeroClaw.git`) or point `OPENCLAW_IMAGE` to a prebuilt image you can pull.
|
||||
The app container defaults to `OPENCLAW_BASE_URL=http://openclaw:4000` unless you explicitly set a different `OPENCLAW_BASE_URL`.
|
||||
On container startup, the app applies Drizzle migrations automatically before launching Next.js.
|
||||
The app stores SQLite data in Docker volume `fiscal_sqlite_data` (mounted to `/app/data`) and workflow local data in `fiscal_workflow_data` (mounted to `/app/.workflow-data`).
|
||||
|
||||
@@ -85,10 +88,14 @@ BETTER_AUTH_SECRET=replace-with-a-long-random-secret
|
||||
BETTER_AUTH_BASE_URL=https://fiscal.b11studio.xyz
|
||||
BETTER_AUTH_TRUSTED_ORIGINS=https://fiscal.b11studio.xyz
|
||||
|
||||
OPENCLAW_BASE_URL=http://localhost:4000
|
||||
OPENCLAW_API_KEY=your_key
|
||||
OPENCLAW_BASE_URL=
|
||||
OPENCLAW_API_KEY=
|
||||
OPENCLAW_MODEL=zeroclaw
|
||||
OPENCLAW_AUTH_MODE=bearer
|
||||
OPENCLAW_AUTH_MODE=none
|
||||
OPENCLAW_PORT=4000
|
||||
OPENCLAW_IMAGE=coolify-zeroclaw:local
|
||||
OPENCLAW_BUILD_CONTEXT=https://gitea-hs848cs8kgs840o8c8s8cwkk.b11studio.xyz/Francy51/coolify_ZeroClaw.git
|
||||
OPENCLAW_DOCKERFILE=Dockerfile
|
||||
# for OPENCLAW_AUTH_MODE=basic
|
||||
# OPENCLAW_BASIC_AUTH_USERNAME=your_nginx_user
|
||||
# OPENCLAW_BASIC_AUTH_PASSWORD=your_nginx_password
|
||||
|
||||
@@ -5,3 +5,6 @@ services:
|
||||
environment:
|
||||
BETTER_AUTH_BASE_URL: ${BETTER_AUTH_BASE_URL:-http://localhost:3000}
|
||||
BETTER_AUTH_TRUSTED_ORIGINS: ${BETTER_AUTH_TRUSTED_ORIGINS:-http://localhost:3000}
|
||||
openclaw:
|
||||
ports:
|
||||
- '${OPENCLAW_PORT:-4000}:4000'
|
||||
|
||||
@@ -18,10 +18,10 @@ services:
|
||||
BETTER_AUTH_BASE_URL: ${BETTER_AUTH_BASE_URL:-https://fiscal.b11studio.xyz}
|
||||
BETTER_AUTH_ADMIN_USER_IDS: ${BETTER_AUTH_ADMIN_USER_IDS:-}
|
||||
BETTER_AUTH_TRUSTED_ORIGINS: ${BETTER_AUTH_TRUSTED_ORIGINS:-https://fiscal.b11studio.xyz}
|
||||
OPENCLAW_BASE_URL: ${OPENCLAW_BASE_URL:-}
|
||||
OPENCLAW_BASE_URL: ${OPENCLAW_BASE_URL:-http://openclaw:4000}
|
||||
OPENCLAW_API_KEY: ${OPENCLAW_API_KEY:-}
|
||||
OPENCLAW_MODEL: ${OPENCLAW_MODEL:-zeroclaw}
|
||||
OPENCLAW_AUTH_MODE: ${OPENCLAW_AUTH_MODE:-bearer}
|
||||
OPENCLAW_AUTH_MODE: ${OPENCLAW_AUTH_MODE:-none}
|
||||
OPENCLAW_BASIC_AUTH_USERNAME: ${OPENCLAW_BASIC_AUTH_USERNAME:-}
|
||||
OPENCLAW_BASIC_AUTH_PASSWORD: ${OPENCLAW_BASIC_AUTH_PASSWORD:-}
|
||||
OPENCLAW_API_KEY_HEADER: ${OPENCLAW_API_KEY_HEADER:-}
|
||||
@@ -32,6 +32,9 @@ services:
|
||||
volumes:
|
||||
- fiscal_sqlite_data:/app/data
|
||||
- fiscal_workflow_data:/app/.workflow-data
|
||||
depends_on:
|
||||
openclaw:
|
||||
condition: service_started
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:3000/api/health || exit 1"]
|
||||
interval: 30s
|
||||
@@ -40,6 +43,15 @@ services:
|
||||
expose:
|
||||
- "3000"
|
||||
|
||||
openclaw:
|
||||
image: ${OPENCLAW_IMAGE:-coolify-zeroclaw:local}
|
||||
build:
|
||||
context: ${OPENCLAW_BUILD_CONTEXT:-https://gitea-hs848cs8kgs840o8c8s8cwkk.b11studio.xyz/Francy51/coolify_ZeroClaw.git}
|
||||
dockerfile: ${OPENCLAW_DOCKERFILE:-Dockerfile}
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "4000"
|
||||
|
||||
volumes:
|
||||
fiscal_sqlite_data:
|
||||
fiscal_workflow_data:
|
||||
|
||||
Reference in New Issue
Block a user