Refactor Dockerfile for improved build process; switch to node:20 base image, add build step, and configure volume and port exposure. Update package dependencies for bcrypt and bcryptjs, remove unused files, and enhance README with clearer project structure and setup instructions.

This commit is contained in:
2025-06-18 17:22:40 +02:00
parent dd10624ce4
commit 7e8aa3f498
11 changed files with 591 additions and 678 deletions

View File

@@ -1,4 +1,4 @@
FROM node:20-alpine
FROM node:20
WORKDIR /app
@@ -8,4 +8,16 @@ RUN npm install
COPY . .
CMD ["npm", "start"]
RUN npm run build
VOLUME ["/app/docker"]
EXPOSE 3000
CMD ["npm", "start"]
# Building Instructions
#
# docker build -t markdownblog .
# docker run -p 8080:3000 -v markdownblog-posts:/app/docker markdownblog
# docker container prune