diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..224a4ed45 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM node:14-slim + +# Set the working directory +WORKDIR /app + +# Copy package.json and yarn.lock to the working directory +COPY package.json ./ + +# Install dependencies using Yarn +RUN yarn install + +# Copy app to working directory +COPY . . + +# Expose port 3000 +EXPOSE 3000 + +# Start the app +CMD ["yarn", "start"] diff --git a/README.md b/README.md index bc24e3d78..50515397a 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,22 @@ After cloning the files, you will have to run ```yarn``` followed by ```yarn sta Change the data in the ```data.json``` file as well as add any images to ```public/img/``` You can also change styles by modifying the ```public/css``` files. +### Docker Alternative to start the app +
+ +You will need to have Docker installed.
+ Docker for Windows:
+ Docker for macOS:
+ Docker for Linux: + +#### Build the image +``` docker build -t react-landing-page-template . ``` + +#### Deploy the image +``` docker run -p 3000:3000 react-landing-page-template ``` + + + ## Like this project? Buy my a coffee ☕️