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

"docker-compose up" sporadic race condition #11

Open
robertreppel opened this issue Apr 14, 2018 · 3 comments
Open

"docker-compose up" sporadic race condition #11

robertreppel opened this issue Apr 14, 2018 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@robertreppel
Copy link
Contributor

Sporadic Race condition when doing cd api && npm install && docker-compose up -d
API doesn't start because Eventstore isn't up yet. (Workaround: docker-compose restart api)

@robertreppel robertreppel added the help wanted Extra attention is needed label Apr 14, 2018
@mohkami
Copy link
Contributor

mohkami commented Apr 22, 2018

Does it happen on the first run too? After the first time, if I make any changes to the EMD file and run the following commands, I don't see my changes in swagger (containers are not restarted)
les convert && les-node -b && cd api && npm install && docker-compose up -d

I'm wondering if the --force-recreate flag should be added to the docker-compose up. (This is what I had to do to be able to see my changes). As per the docker documentation, it doesn't seem like docker-compose up would recreate the containers in this case:

If there are existing containers for a service, and the service’s configuration or image was changed after the container’s creation, docker-compose up picks up the changes by stopping and recreating the containers (preserving mounted volumes). To prevent Compose from picking up changes, use the --no-recreate flag.
If you want to force Compose to stop and recreate all containers, use the --force-recreate flag.

ref: https://docs.docker.com/compose/reference/up/

@robertreppel
Copy link
Contributor Author

Yes, it happens on the first run too.

Thanks for the '--force-recreate' suggestion - yes. I've updated the README.

R.

@mohkami
Copy link
Contributor

mohkami commented May 20, 2018

@robertreppel
Created a PR in the template repo to address this:
Adaptech/les-node-template#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants