Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Front-end docker failing #165

Open
mansogf opened this issue Mar 11, 2021 · 2 comments
Open

Front-end docker failing #165

mansogf opened this issue Mar 11, 2021 · 2 comments
Assignees
Labels
bug Something isn't working frontend

Comments

@mansogf
Copy link
Collaborator

mansogf commented Mar 11, 2021

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 mansogf added the bug Something isn't working label Mar 11, 2021
@mansogf mansogf self-assigned this Mar 11, 2021
@mansogf
Copy link
Collaborator Author

mansogf commented Mar 11, 2021

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
Copy link
Collaborator Author

mansogf commented Mar 11, 2021

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend
Projects
None yet
Development

No branches or pull requests

1 participant