Open rose-munaretto opened 5 months ago
While digging on Compose Watch documentation, it turned out that docker compose up --watch
command works 🤷♀️
I don't know if that helps you but in my case it allows me to keep following the tutorial ✌️
I also had issues.
Neither downloading the Zip file in the guides nor cloning the git repo worked for me.
This is what I get when I try to run docker compose watch on the project I pulled from github.
When I try to run the docker compose watch in the project I get form the zip file I also run into issues:
Hope this helps someone who wants to look into this further.
@thedayisntgray You can use docker compose up --watch
to bring up the application.
Change the my sql setting as the following can solve this problem.
` mysql: image: mysql:8.0 volumes:
@thedayisntgray restart main-backend container. This may be because the mysql container has not been successfully connected when the backend container command is executed. The backend container does not restart when the setting command fails. Therefore, restart the container manually
I had the same error as @rose-munaretto and the same error log as @thedayisntgray's first image. After poking around the container and the source files, I came to the same conclusion as @kaworuist: all of the services are trying to start up at the same time and mysql is lagging behind the rest, causing the backend to fail to connect to it.
I'd like to suggest an easy update to the project that seems to have fixed things for me without having to use docker compose up --watch
(meaning we would be able to use docker compose watch
as the tutorial still suggests): add a depends_on
element (reference) to the compose.yaml file.
backend:
depends_on:
- mysql
If I understand this correctly, this will cause Docker compose to ensure mysql is started before attempting to start backend.
After adding this and reattempting docker compose watch
from a clean, imageless state, everything worked for me! I didn't encounter the same error.
I had the same error as @rose-munaretto and the same error log as @thedayisntgray's first image. After poking around the container and the source files, I came to the same conclusion as @kaworuist: all of the services are trying to start up at the same time and mysql is lagging behind the rest, causing the backend to fail to connect to it.
I'd like to suggest an easy update to the project that seems to have fixed things for me without having to use
docker compose up --watch
(meaning we would be able to usedocker compose watch
as the tutorial still suggests): add adepends_on
element (reference) to the compose.yaml file.backend: depends_on: - mysql
If I understand this correctly, this will cause Docker compose to ensure mysql is started before attempting to start backend.
After adding this and reattempting
docker compose watch
from a clean, imageless state, everything worked for me! I didn't encounter the same error.
This fixed it for me, I was having all the 500 errors too
I'm not sure if this is the right place to report and maybe it should probably go to docker/compose repo so feel free to redirect me there.
Description
While I'm trying to follow the guide,
docker compose watch
throws an error.Steps To Reproduce
docker compose watch
.Compose Version
Docker Environment