clawsql 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docker/Dockerfile.allinone +3 -6
- package/package.json +2 -4
- package/docker/Dockerfile +0 -61
|
@@ -16,26 +16,23 @@ COPY package.json package-lock.json* ./
|
|
|
16
16
|
RUN npm ci
|
|
17
17
|
COPY . .
|
|
18
18
|
RUN npm run build
|
|
19
|
+
# Prune to production dependencies only
|
|
20
|
+
RUN npm prune --production
|
|
19
21
|
|
|
20
22
|
# =============================================================================
|
|
21
23
|
# Final all-in-one image (Debian-based for glibc compatibility)
|
|
22
24
|
# =============================================================================
|
|
23
25
|
FROM debian:bookworm-slim
|
|
24
26
|
|
|
25
|
-
# Install
|
|
27
|
+
# Install runtime dependencies (minimal set)
|
|
26
28
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
27
29
|
nodejs \
|
|
28
|
-
npm \
|
|
29
30
|
curl \
|
|
30
31
|
wget \
|
|
31
32
|
default-mysql-client \
|
|
32
33
|
supervisor \
|
|
33
|
-
python3 \
|
|
34
|
-
python3-pip \
|
|
35
34
|
bash \
|
|
36
35
|
procps \
|
|
37
|
-
gnupg \
|
|
38
|
-
lsb-release \
|
|
39
36
|
ca-certificates \
|
|
40
37
|
&& rm -rf /var/lib/apt/lists/*
|
|
41
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawsql",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "MySQL Cluster Automation and Operations Management System",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@fastify/cors": "^10.0.1",
|
|
34
34
|
"@fastify/helmet": "^13.0.1",
|
|
35
|
-
"@fastify/jwt": "^9.0.1",
|
|
36
35
|
"@fastify/swagger": "^9.5.1",
|
|
37
36
|
"@fastify/swagger-ui": "^5.2.1",
|
|
38
37
|
"axios": "^1.7.2",
|
|
@@ -44,10 +43,8 @@
|
|
|
44
43
|
"fastify-type-provider-zod": "^5.0.0",
|
|
45
44
|
"inquirer": "^13.3.2",
|
|
46
45
|
"mysql2": "^3.11.0",
|
|
47
|
-
"openclaw": "^2026.3.13",
|
|
48
46
|
"ora": "^9.3.0",
|
|
49
47
|
"pino": "^9.0.0",
|
|
50
|
-
"pino-pretty": "^11.0.0",
|
|
51
48
|
"prom-client": "^15.1.3",
|
|
52
49
|
"uuid": "^9.0.1",
|
|
53
50
|
"zod": "^3.23.8"
|
|
@@ -61,6 +58,7 @@
|
|
|
61
58
|
"@typescript-eslint/parser": "^7.0.0",
|
|
62
59
|
"eslint": "^8.57.0",
|
|
63
60
|
"jest": "^29.7.0",
|
|
61
|
+
"pino-pretty": "^11.0.0",
|
|
64
62
|
"ts-jest": "^29.1.4",
|
|
65
63
|
"ts-node": "^10.9.2",
|
|
66
64
|
"ts-node-dev": "^2.0.0",
|
package/docker/Dockerfile
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# ClawSQL Application Dockerfile
|
|
2
|
-
# Multi-stage build for optimized image size
|
|
3
|
-
|
|
4
|
-
# Build stage
|
|
5
|
-
FROM python:3.11-slim as builder
|
|
6
|
-
|
|
7
|
-
WORKDIR /build
|
|
8
|
-
|
|
9
|
-
# Install build dependencies
|
|
10
|
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
11
|
-
gcc \
|
|
12
|
-
libmariadb-dev \
|
|
13
|
-
pkg-config \
|
|
14
|
-
&& rm -rf /var/lib/apt/lists/*
|
|
15
|
-
|
|
16
|
-
# Copy requirements
|
|
17
|
-
COPY requirements.txt .
|
|
18
|
-
|
|
19
|
-
# Create virtual environment and install dependencies
|
|
20
|
-
RUN python -m venv /opt/venv
|
|
21
|
-
ENV PATH="/opt/venv/bin:$PATH"
|
|
22
|
-
RUN pip install --no-cache-dir --upgrade pip && \
|
|
23
|
-
pip install --no-cache-dir -r requirements.txt
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# Runtime stage
|
|
27
|
-
FROM python:3.11-slim
|
|
28
|
-
|
|
29
|
-
WORKDIR /app
|
|
30
|
-
|
|
31
|
-
# Install runtime dependencies
|
|
32
|
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
33
|
-
libmariadb3 \
|
|
34
|
-
curl \
|
|
35
|
-
&& rm -rf /var/lib/apt/lists/*
|
|
36
|
-
|
|
37
|
-
# Copy virtual environment from builder
|
|
38
|
-
COPY --from=builder /opt/venv /opt/venv
|
|
39
|
-
ENV PATH="/opt/venv/bin:$PATH"
|
|
40
|
-
|
|
41
|
-
# Copy application code
|
|
42
|
-
COPY src/ /app/src/
|
|
43
|
-
COPY pyproject.toml /app/
|
|
44
|
-
|
|
45
|
-
# Set Python path
|
|
46
|
-
ENV PYTHONPATH=/app/src
|
|
47
|
-
ENV PYTHONUNBUFFERED=1
|
|
48
|
-
|
|
49
|
-
# Create non-root user
|
|
50
|
-
RUN useradd -m -u 1000 clawsql && chown -R clawsql:clawsql /app
|
|
51
|
-
USER clawsql
|
|
52
|
-
|
|
53
|
-
# Health check
|
|
54
|
-
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
55
|
-
CMD curl -f http://localhost:8080/health || exit 1
|
|
56
|
-
|
|
57
|
-
# Expose port
|
|
58
|
-
EXPOSE 8080
|
|
59
|
-
|
|
60
|
-
# Run application
|
|
61
|
-
CMD ["python", "-m", "uvicorn", "clawsql.main:app", "--host", "0.0.0.0", "--port", "8080"]
|