diff --git a/README.md b/README.md index 1c72b5d..85e834c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Setup Guide +# Setup Guide - LOCAL After you clone the repository, run @@ -118,6 +118,26 @@ cd frontend npm start ``` +# Docker setup + +Assuming your .env files are configured properly, you can run them in docker containers as well. + +## Docker setup - frontend + +``` +cd frontend +docker build -t wato-finance-frontend . +docker run -p 3000:3000 -d wato-finance-frontend +``` + +## Docker setup - backend + +``` +cd backend +docker build -t wato-finance-backend . +docker run -p 5000:5000 -d wato-finance-backend +``` + --- ## Notes diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..5b3c23d --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,7 @@ +FROM node:14 +WORKDIR /usr/src/app/backend +COPY package*.json ./ +RUN npm install +COPY . . +EXPOSE 5000 +CMD ["node", "server.js"] diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..9a91400 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,7 @@ +FROM node:14 +WORKDIR /usr/src/app/frontend +COPY package*.json ./ +RUN npm install +COPY . . +EXPOSE 3000 +CMD ["npm", "start"]