You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I could work on this - Also I had a minor side question about the make setup in Makefile, Is there a reason we are mostly using docker-compose run instead of docker-compose exec ?
For example, the following happens:
.PHONY: bg
bg:
${DOCKER_COMPOSE} up --build -d # A new db and resource container created and running#--------------------Some other stuff------------------------------.PHONY: setup
setup: bg
${DOCKER_COMPOSE} run ${RESOURCES_CONTAINER}${FLASK}# Another new oneshot container created${DOCKER_COMPOSE} run ${RESOURCES_CONTAINER}${FLASK} db-migrate create-tables # Again${DOCKER_COMPOSE} run ${RESOURCES_CONTAINER}${FLASK} db stamp head # Again${DOCKER_COMPOSE} run ${RESOURCES_CONTAINER}${FLASK} db-migrate init # Again
This leads to multiple uneccessary stopped containers, if we substitute the run to exec it would utilize the already up container created by bg and would make it faster as well. Though I could be wrong so I'd love to know more!
At the time, I don't think any of us realized that it wasn't using the same container. Feel free to change it to docker-compose exec and if I don't see that breaking any functionality, I'll merge. Thanks for pointing that out!
Activity
Kandeel4411 commentedon Oct 4, 2020
I think I could work on this - Also I had a minor side question about the
make setupin Makefile, Is there a reason we are mostly usingdocker-compose runinstead ofdocker-compose exec?For example, the following happens:
This leads to multiple uneccessary stopped containers, if we substitute the
runtoexecit would utilize the already up container created bybgand would make it faster as well. Though I could be wrong so I'd love to know more!Edit: welp nvm, platipo seems to be working on it
aaron-junot commentedon Oct 4, 2020
At the time, I don't think any of us realized that it wasn't using the same container. Feel free to change it to
docker-compose execand if I don't see that breaking any functionality, I'll merge. Thanks for pointing that out!