Skip to content

Commit ec2643b

Browse files
committed
move things around, add entrypoint.sh
1 parent ba5c16c commit ec2643b

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

Dockerfile renamed to .smithery/Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ RUN apt-get update && \
1414
# Create a directory for the application
1515
WORKDIR /app
1616

17-
# Copy package.json and package-lock.json
18-
COPY . .
17+
COPY ../ .
1918

2019
# Install application dependencies
2120
RUN npm ci
2221

2322
RUN npm run build
2423

25-
RUN mongod --fork --logpath /var/log/mongodb.log
24+
# Copy the entrypoint script
25+
COPY ./.smithery/entrypoint.sh /usr/local/bin/entrypoint.sh
26+
RUN chmod +x /usr/local/bin/entrypoint.sh
2627

27-
# Start MongoDB and the application
28-
CMD ["node", "dist/index.js --connectionString mongodb://localhost:27017"]
28+
CMD ["node", "dist/index.js", "--connectionString", "mongodb://localhost:27017"]
29+
30+
ENTRYPOINT ["entrypoint.sh"]

.smithery/entrypoint.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
# Start MongoDB
4+
mongod --fork --logpath /var/log/mongodb.log --dbpath /data/db
5+
6+
# Execute the provided command or default to the application
7+
exec "$@"

smithery.yaml renamed to .smithery/smithery.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Smithery.ai configuration
2+
build:
3+
dockerfile: Dockerfile
4+
dockerBuildPath: ../
25
startCommand:
36
type: stdio
47
configSchema:

0 commit comments

Comments
 (0)