Skip to content

Commit 1a7998f

Browse files
committed
Updated dockerfile and changelog
1 parent d2a0d12 commit 1a7998f

File tree

2 files changed

+54
-8
lines changed

2 files changed

+54
-8
lines changed

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,43 @@
3434
- Foreign key constraints
3535
- Table statistics
3636

37+
## [1.0.13] - 2024-05-26
38+
39+
### Added
40+
- Complete write operations support through Smithery configuration
41+
- Added environment variables for database write operations (`ALLOW_INSERT_OPERATION`, `ALLOW_UPDATE_OPERATION`, `ALLOW_DELETE_OPERATION`)
42+
- New configuration options in Smithery schema for controlling write permissions
43+
- Improved documentation for write operations configuration
44+
- Support for enabling/disabling specific SQL operations via environment variables
45+
- Enhanced error handling for unauthorized write operations
46+
47+
### Changed
48+
- Updated Smithery configuration to include write operation settings
49+
- Improved Smithery integration with clear security defaults
50+
- Enhanced documentation with detailed configuration examples
51+
- Restructured README with clearer installation instructions
52+
- Better error reporting for database connection issues
53+
- Improved transaction handling for write operations
54+
55+
### Fixed
56+
- Fixed error handling for database connection failures
57+
- Improved error messages for unauthorized operations
58+
- Better handling of MySQL 8.0+ authentication methods
59+
- Fixed SSL/TLS configuration options in Smithery
60+
61+
### Security
62+
- All write operations (INSERT, UPDATE, DELETE) disabled by default
63+
- Added clear documentation about security implications of enabling write operations
64+
- Improved transaction isolation for write operations
65+
- Enhanced error reporting that doesn't expose sensitive information
66+
67+
### Documentation
68+
- Updated README with comprehensive Smithery configuration instructions
69+
- Added detailed examples for enabling specific write operations
70+
- Improved troubleshooting section with common issues and solutions
71+
- Better explanation of required MySQL permissions for different operation types
72+
- Added clear security recommendations for production deployments
73+
3774
## [1.0.10] - 2024-03-13
3875

3976
### Changed

Dockerfile

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,51 @@
22
# Use a Node.js Alpine image as the base
33
FROM node:22-alpine AS builder
44

5+
# Install pnpm
6+
RUN npm install -g pnpm
7+
58
# Set the working directory
69
WORKDIR /app
710

8-
# Copy the package.json and package-lock.json if present
9-
COPY package.json /app/
10-
COPY pnpm-lock.yaml /app/
11+
# Copy the package.json and pnpm-lock.yaml if present
12+
COPY package.json pnpm-lock.yaml* /app/
1113

1214
# Install the dependencies
13-
RUN --mount=type=cache,target=/root/.npm npm install --ignore-scripts
15+
RUN pnpm install --frozen-lockfile --ignore-scripts
1416

1517
# Copy the rest of the application code
1618
COPY . /app
1719

1820
# Build the application
19-
RUN npm run build
21+
RUN pnpm run build
2022

2123
# Use a new, clean image for the release
2224
FROM node:22-alpine
2325

26+
# Install pnpm
27+
RUN npm install -g pnpm
28+
2429
# Set the working directory
2530
WORKDIR /app
2631

2732
# Copy the built files from the builder
2833
COPY --from=builder /app/dist /app/dist
29-
COPY --from=builder /app/package.json /app/package.json
30-
COPY --from=builder /app/package-lock.json /app/package-lock.json
34+
COPY --from=builder /app/package.json /app/
35+
COPY --from=builder /app/pnpm-lock.yaml* /app/
3136

3237
# Set environment variables
3338
ENV MYSQL_HOST=127.0.0.1
3439
ENV MYSQL_PORT=3306
3540
ENV MYSQL_USER=root
3641
ENV MYSQL_PASS=
3742
ENV MYSQL_DB=db_name
43+
ENV ALLOW_INSERT_OPERATION=true
44+
ENV ALLOW_UPDATE_OPERATION=true
45+
ENV ALLOW_DELETE_OPERATION=false
3846

3947
# Install production dependencies only
40-
RUN npm ci --omit=dev
48+
# Add --no-optional flag to skip lifecycle scripts like prepare
49+
RUN pnpm install --prod --frozen-lockfile --ignore-scripts
4150

4251
# Expose any ports if necessary (e.g., 8080)
4352
# EXPOSE 8080

0 commit comments

Comments
 (0)