Enhanced Dockerfile snippet in README.md
The Dockerfile snippet in the README.md file required adjustments to align it more closely with the actual Dockerfiles in both the Backend and Frontend directories. I've made a few improvements to ensure clarity and accuracy.
Original Snippet in Repository:
FROM node:13.13.0-stretch-slim
# Argument passed from docker-compose.yaml file
ARG NODE_PORT
# Echo the argument to check if it's loaded correctly
RUN echo "Argument port is: $NODE_PORT"
# Create app directory
WORKDIR /usr/src/app
# Copy entire content
COPY . .
# Install app dependencies
RUN npm install
# My app binds to port NODE_PORT; use the EXPOSE instruction for Docker daemon mapping:
EXPOSE ${NODE_PORT}
CMD npm run dev
Modified Snippet:
FROM node:13.13.0-stretch-slim
# Argument passed from docker-compose.yaml file
ARG NODE_PORT
# Echo the argument to check if it's loaded correctly
RUN echo "Argument port is: $NODE_PORT"
# Create app directory
WORKDIR /usr/src/app
# Copy dependency definitions first for better Docker caching
COPY package.json /usr/src/app
# Install app dependencies
RUN npm install
# Copy the entire application code
COPY . /usr/src/app
# My app binds to port NODE_PORT; use the EXPOSE instruction for Docker daemon mapping:
EXPOSE ${NODE_PORT}
CMD npm run dev
These changes ensure consistency and readability.
Signed-off-by: Thoshinny B <69354714+Thoshinny-cyber@users.noreply.github.com>
- apply prettier style on every js file
- remove mutation on immutable variables
- remove wrapper on top of axios
- fix form handling
- remove useless port definition in dockerfile
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
to fix some syntax issues in the existing code, the commit
put in place prettier and format the code
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
The goal here is to keep the same structure than the other examples.
Also, considering that it has a "frontend" folder, the equivalent for
the server should be "backend".
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>