lappis-unb / BotFlow

BotFlow - visual content manager for simple Rasa chatbots
GNU General Public License v3.0
30 stars 12 forks source link

Front-end docker failing #165

Open mansogf opened 3 years ago

mansogf commented 3 years ago

Describe the bug Was reported by the team that while developing the app the docker was not updating changes on the application correctly.

Steps to Reproduce

  1. sudo docker-compose up.
  2. Change any code line.
  3. Save it.
  4. Check the changes on the website (it won't update).

Expected behavior When the code is changed, it, immediately, must reflect the changes in the application.

mansogf commented 3 years ago

The error was happening because of 2 factors:

  1. In the Dockerfile botflow was written as botFlow instead of botflow.
FROM node:10-jessie-slim 

RUN mkdir /botflow
WORKDIR /botflow
COPY ./app .
EXPOSE 3000
CMD ["sh", "-c", "yarn install && yarn start"] 
  1. It was not recognizing the file package.json. Thus, I added the following command:

COPY /app/package.json .

mansogf commented 3 years ago

Also, to optimize the Dockerfile was added the following line:

RUN yarn install # cache the command
CMD ["sh", "-c", "yarn start"]