Holy hell it works kind of

This commit is contained in:
DominicJamesWhite 2025-04-09 18:33:57 +02:00
parent 212844d5dc
commit 2ab7ac81d1
3 changed files with 34 additions and 5 deletions

View File

@ -35,21 +35,50 @@ ENV OPENAI_API_KEY=""
ENV GOOGLE_API_KEY="" ENV GOOGLE_API_KEY=""
ENV CODE="" ENV CODE=""
ENV ENABLE_MCP="" ENV ENABLE_MCP=""
ENV HUMANITEC_TOKEN=""
COPY --from=builder /app/public ./public COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/.next/server ./.next/server COPY --from=builder /app/.next/server ./.next/server
COPY --from=builder /app/app/mcp ./app/mcp
EXPOSE 3000 EXPOSE 3000
CMD echo "Installing humctl..." && \ CMD echo "Listing contents of /app/app/mcp before starting server:" && \
ls -la /app/app/mcp && \
echo "-----------------------------------------------------" && \
echo "Installing humctl..." && \
HUMCTL_ARCH=$(uname -m) && \ HUMCTL_ARCH=$(uname -m) && \
if [ "$HUMCTL_ARCH" = "x86_64" ]; then HUMCTL_ARCH="amd64"; fi && \ HUMCTL_VERSION="v0.39.2" && \
curl -L "https://github.com/humanitec/cli/releases/latest/download/humctl_Linux_${HUMCTL_ARCH}.tar.gz" | tar xz -C /usr/local/bin && \ if [ "$HUMCTL_ARCH" = "x86_64" ]; then HUMCTL_ARCH="amd64"; \
elif [ "$HUMCTL_ARCH" = "aarch64" ]; then HUMCTL_ARCH="arm64"; fi && \
HUMCTL_FILENAME="cli_${HUMCTL_VERSION#v}_linux_${HUMCTL_ARCH}.tar.gz" && \
HUMCTL_URL="https://github.com/humanitec/cli/releases/download/${HUMCTL_VERSION}/${HUMCTL_FILENAME}" && \
echo "Downloading humctl version ${HUMCTL_VERSION} for architecture ${HUMCTL_ARCH} from ${HUMCTL_URL}" && \
curl -fSL "$HUMCTL_URL" -o /tmp/humctl.tar.gz && \
echo "Extracting humctl..." && \
tar xzf /tmp/humctl.tar.gz -C /usr/local/bin && \
rm /tmp/humctl.tar.gz && \
chmod +x /usr/local/bin/humctl && \ chmod +x /usr/local/bin/humctl && \
echo "humctl installed successfully." && \ echo "humctl installed successfully." && \
\ \
echo "Installing canyon-cli..." && \
CANYON_ARCH=$(uname -m) && \
CANYON_VERSION="v0.0.7" && \
if [ "$CANYON_ARCH" = "x86_64" ]; then CANYON_ARCH="amd64"; \
elif [ "$CANYON_ARCH" = "aarch64" ]; then CANYON_ARCH="arm64"; fi && \
CANYON_FILENAME="canyon-cli_${CANYON_VERSION#v}_linux_${CANYON_ARCH}.tar.gz" && \
CANYON_URL="https://github.com/humanitec/canyon-cli/releases/download/${CANYON_VERSION}/${CANYON_FILENAME}" && \
echo "Downloading canyon-cli version ${CANYON_VERSION} for architecture ${CANYON_ARCH} from ${CANYON_URL}" && \
mkdir -p /app/bin && \
curl -fSL "$CANYON_URL" -o /tmp/canyon.tar.gz && \
echo "Extracting canyon-cli..." && \
tar xzf /tmp/canyon.tar.gz -C /app/bin canyon && \
rm /tmp/canyon.tar.gz && \
chmod +x /app/bin/canyon && \
echo "canyon-cli installed successfully to /app/bin/canyon." && \
\
if [ -n "$PROXY_URL" ]; then \ if [ -n "$PROXY_URL" ]; then \
export HOSTNAME="0.0.0.0"; \ export HOSTNAME="0.0.0.0"; \
protocol=$(echo $PROXY_URL | cut -d: -f1); \ protocol=$(echo $PROXY_URL | cut -d: -f1); \

View File

@ -19,7 +19,7 @@ import path from "path";
import { getServerSideConfig } from "../config/server"; import { getServerSideConfig } from "../config/server";
const logger = new MCPClientLogger("MCP Actions"); const logger = new MCPClientLogger("MCP Actions");
const CONFIG_PATH = path.join(process.cwd(), "app/mcp/mcp_config.json"); const CONFIG_PATH = "/app/app/mcp/mcp_config.json"; // Use absolute path
const clientsMap = new Map<string, McpClientData>(); const clientsMap = new Map<string, McpClientData>();

View File

@ -3,7 +3,7 @@
"canyon": { "canyon": {
"command": "/app/bin/canyon", "command": "/app/bin/canyon",
"args": ["mcp"], "args": ["mcp"],
"env": {} "env": { "HOME": "/root" }
} }
} }
} }