chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
FROM python:3.12-slim AS builder
|
||||
|
||||
RUN pip install uv --no-cache-dir
|
||||
|
||||
WORKDIR /src
|
||||
COPY backend/core_agent/ ./core_agent/
|
||||
COPY backend/core_api/ ./core_api/
|
||||
|
||||
RUN python -m venv /opt/venv && \
|
||||
/opt/venv/bin/pip install uv --no-cache-dir && \
|
||||
/opt/venv/bin/uv pip install ./core_agent ./core_api
|
||||
|
||||
FROM python:3.12-slim AS runtime
|
||||
|
||||
LABEL org.opencontainers.image.title="cowork-api"
|
||||
LABEL org.opencontainers.image.source="https://github.com/mindsdb/minds-platform"
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& useradd -m -u 1000 -s /bin/bash cowork
|
||||
|
||||
COPY --from=builder /opt/venv /opt/venv
|
||||
ENV PATH="/opt/venv/bin:$PATH" \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
COWORK_SERVER_HOST=0.0.0.0 \
|
||||
COWORK_SERVER_PORT=26866
|
||||
|
||||
RUN mkdir -p /home/cowork/.cowork && chown cowork:cowork /home/cowork/.cowork
|
||||
|
||||
USER cowork
|
||||
|
||||
EXPOSE 26866
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
||||
CMD python -c "import urllib.request,sys; \
|
||||
sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:26866/health',timeout=3).status==200 else 1)"
|
||||
|
||||
CMD ["cowork-server"]
|
||||
@@ -0,0 +1,18 @@
|
||||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location /v1/ {
|
||||
proxy_pass http://api:26866;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 120s;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
FROM node:22-slim AS builder
|
||||
|
||||
WORKDIR /build
|
||||
COPY frontend/package.json frontend/package-lock.json ./
|
||||
RUN npm ci --ignore-scripts
|
||||
COPY frontend/ ./
|
||||
RUN npm run build:web
|
||||
|
||||
FROM nginx:alpine AS runtime
|
||||
|
||||
LABEL org.opencontainers.image.title="cowork-web"
|
||||
LABEL org.opencontainers.image.source="https://github.com/mindsdb/minds-platform"
|
||||
|
||||
COPY --from=builder /build/dist/renderer-web/ /usr/share/nginx/html/
|
||||
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user