Prep build setup for stack
This commit is contained in:
parent
3a761e3eb1
commit
bd2ffee9ae
14 changed files with 668 additions and 91 deletions
|
|
@ -6,17 +6,17 @@ WORKDIR /app
|
|||
# Copy package files first to leverage Docker's build cache
|
||||
COPY package*.json ./
|
||||
|
||||
# Install all dependencies needed for the build
|
||||
RUN npm install
|
||||
# Install dependencies
|
||||
RUN npm ci --only=production=false
|
||||
|
||||
# Copy the rest of your application code
|
||||
COPY . .
|
||||
|
||||
# Run the build script to compile the React frontend
|
||||
# Build the React application
|
||||
RUN npm run build
|
||||
|
||||
# Expose the port your server will listen on
|
||||
# Expose the port
|
||||
EXPOSE 3000
|
||||
|
||||
# The command to start your production server
|
||||
CMD ["npm", "run", "host"]
|
||||
# Use preview mode for production-like serving
|
||||
CMD ["npm", "run", "preview"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue