Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions configuration/n8n-workflows/GHOSTS Belief.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions configuration/n8n-workflows/GHOSTS Connections.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions configuration/n8n-workflows/GHOSTS Post to Social Media.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions configuration/n8n-workflows/GHOSTS Preferences.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions configuration/n8n-workflows/GHOSTS Social Graph.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions configuration/n8n-workflows/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/core/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ Set these in a `.env` file alongside `docker-compose.yml` or directly in your co

| Variable | Default | Description |
|----------|---------|-------------|
| `N8N_API_URL` | `http://host.docker.internal:5678/api/v1/workflows` | n8n REST API endpoint (used by the API to list and validate workflows) |
| `N8N_API_URL` | `http://ghosts-n8n:5678/api/v1/workflows` | n8n REST API endpoint (used by the API to list and validate workflows) |
| `N8N_API_KEY` | *(empty)* | n8n API key — **required** for workflow scheduling. Generate in n8n: Settings > API > Create API Key. |
| `WEB_API_URL` | `http://host.docker.internal:5000/api` | GHOSTS API URL served to the frontend container |
| `WEB_N8N_API_URL` | `http://host.docker.internal:5678` | n8n base URL served to the frontend container |
| `WEB_API_URL` | `http://localhost:5000/api` | GHOSTS API URL served to the frontend (must be reachable by the browser) |
| `WEB_N8N_API_URL` | `http://localhost:5678` | n8n base URL served to the frontend (must be reachable by the browser) |
| `POSTGRES_PASSWORD` | set_me | PostgreSQL password. **Change this** for any non-local deployment. |

### appsettings.json (Advanced)
Expand Down
8 changes: 4 additions & 4 deletions src/Ghosts.Api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ services:
- "4200:80"
environment:
# API_URL must be reachable by the browser, not by Docker — use localhost since ports are mapped to the host
API_URL: ${WEB_API_URL:-http://host.docker.internal:5000/api}
N8N_API_URL: ${WEB_N8N_API_URL:-http://host.docker.internal:5678}
GRAFANA_URL: ${WEB_GRAFANA_URL:-http://host.docker.internal:3000}
API_URL: ${WEB_API_URL:-http://localhost:5000/api}
N8N_API_URL: ${WEB_N8N_API_URL:-http://localhost:5678}
GRAFANA_URL: ${WEB_GRAFANA_URL:-http://localhost:3000}
ghosts-api:
build:
context: ..
Expand All @@ -44,7 +44,7 @@ services:
ports:
- "5000:5000"
environment:
N8N_API_URL: ${N8N_API_URL:-http://host.docker.internal:5678/api/v1/workflows}
N8N_API_URL: ${N8N_API_URL:-http://ghosts-n8n:5678/api/v1/workflows}
N8N_API_KEY: ${N8N_API_KEY:-replace-me}
restart: unless-stopped

Expand Down
4 changes: 2 additions & 2 deletions src/Ghosts.Pandora/src/appsettings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions src/apphost/AppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
// points at the devcontainer, so map host.ollama -> Docker Desktop's host-gateway IP.
// In the n8n UI, set the Ollama credential Base URL to http://host.ollama:11434.
.WithContainerRuntimeArgs("--add-host", $"host.ollama:{ollamaHostIp}")
// Workflow JSONs call the API as http://ghosts-api:5000 so a single set of files works
// under both Compose (where ghosts-api is a service on the same network) and Aspire.
// Here the API is a devcontainer project, so alias ghosts-api to the host-gateway.
.WithContainerRuntimeArgs("--add-host", "ghosts-api:host-gateway")
.WithBindMount("n8n_data", "/home/node/.n8n", isReadOnly: false)
.WithBindMount("../../configuration/n8n-workflows", "/bootstrap/workflows", isReadOnly: true)
.WithBindMount("../../configuration/n8n-bootstrap/scripts", "/bootstrap/scripts", isReadOnly: true)
Expand Down Expand Up @@ -123,8 +127,9 @@
.WithBindMount("../../configuration/n8n-bootstrap/scripts", "/bootstrap/scripts", isReadOnly: true)
.WaitFor(n8n);

// n8n workflows reach the API via host.docker.internal (configured in workflow nodes),
// not via Aspire service discovery, so no WithReference needed here.
// n8n workflows reach the API as http://ghosts-api:5000 (configured in workflow nodes),
// resolved via the ghosts-api host alias added to the n8n container above — not via
// Aspire service discovery, so no WithReference needed here.

// Wire API to reach n8n for workflow execution — use host.docker.internal since
// the API project runs inside a devcontainer and n8n exposes port 5678 on the host
Expand Down
Loading