git-subtree-dir: main-site git-subtree-mainline: 4d1daa39101c0a85ca6d916f1c31139faf39632a git-subtree-split: 5cefb4d1618bc54ae0e86830421a8c911900302c
24 lines
500 B
Docker
24 lines
500 B
Docker
# Use an official Node.js runtime as a parent image
|
|
FROM node:18-alpine
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy package.json and package-lock.json to the working directory
|
|
COPY package*.json ./
|
|
|
|
# Install any needed packages
|
|
RUN npm install
|
|
|
|
# Bundle app source
|
|
COPY . .
|
|
|
|
# Build optimized frontend assets
|
|
RUN npm run build
|
|
|
|
# Make port 3050 available to the world outside this container
|
|
EXPOSE 3050
|
|
|
|
# Define the command to run the app
|
|
CMD [ "node", "server.js" ]
|