Preparing file structure for multi service build and host.
This commit is contained in:
parent
a69c697b24
commit
3a761e3eb1
16 changed files with 89 additions and 17 deletions
22
web-app/Dockerfile
Normal file
22
web-app/Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# web-app/Dockerfile
|
||||
FROM node:20-alpine
|
||||
|
||||
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
|
||||
|
||||
# Copy the rest of your application code
|
||||
COPY . .
|
||||
|
||||
# Run the build script to compile the React frontend
|
||||
RUN npm run build
|
||||
|
||||
# Expose the port your server will listen on
|
||||
EXPOSE 3000
|
||||
|
||||
# The command to start your production server
|
||||
CMD ["npm", "run", "host"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue