mirror of
https://github.com/falcion/Whisperer.md.git
synced 2026-07-22 11:50:29 +00:00
28 lines
628 B
Docker
28 lines
628 B
Docker
# Use an existing base image
|
|
FROM node:20
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /app
|
|
|
|
# Add a non-root user and switch to that user
|
|
RUN useradd -m appuser
|
|
USER appuser
|
|
|
|
# Copy package.json and package-lock.json to the working directory
|
|
COPY package*.json ./
|
|
COPY source/ ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy the rest of the application code to the working directory
|
|
COPY . .
|
|
|
|
# Expose the port your app runs on
|
|
EXPOSE 3000
|
|
|
|
# Command to start your application
|
|
CMD ["npm", "run", "build"]
|
|
|
|
# Add a HEALTHCHECK to monitor the container
|
|
HEALTHCHECK CMD curl --fail http://localhost:3000 || exit 1
|