chessGame / Dockerfile.backend
ilhamdev's picture
Create Dockerfile.backend
d91d7a7 verified
raw
history blame contribute delete
549 Bytes
# Use an official Node runtime as a parent image
FROM node:18
# Install nodemon globally
RUN npm install -g nodemon
# Create a directory for the application
WORKDIR /app/backend
# Copy package.json and package-lock.json
COPY backend/package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code
COPY backend .
# Ensure correct permissions for the Stockfish binary
RUN chmod +x /app/backend/engine/stockfish
# Expose the port
EXPOSE 3000
# Define the command to run the backend app
CMD ["npm", "run", "dev"]