added dockerfiles

This commit is contained in:
martin.devaux
2025-06-26 14:06:57 +02:00
parent 1ce44c3664
commit bc3714bf19
3 changed files with 86 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
# Use Node 22 alpine as parent image
FROM node:22-alpine
# Change the working directory on the Docker image to /app
WORKDIR /app
# Change specified variables
ENV NODE_ENV=development
# Copy package.json and package-lock.json to the /app directory
COPY package.json package-lock.json* ./
# Install dependencies
RUN npm install
# Copy the rest of project files into this image
COPY . .
# Create those folders if they don't already exist
RUN if [ ! -d uploads ]; then mkdir uploads; fi
RUN if [ ! -d trajectories ]; then mkdir trajectories; fi
# Expose the port
EXPOSE 3001
# Start the server in dev mode
CMD ["npm", "run", "dev"]