Closed JosiahRegencia closed 6 years ago
Also started new branch: new_dockerstuff
tried running: docker-compose -f docker-compose.test.yml run --rm db -d
resulted in:
postgres: option requires an argument -- 'd' Try "postgres --help" for more information.
need to run docker-compose -f docker-compose.test.yml run --rm db in the background
Followed up:
docker-compose.yml
for starting the db/webapp clustertest/Dockerfile
for running the testtest.sh
entrypoint script which sleeps, copies in the db config for testing, etc
Apparently I should let the db container finish starting before I run the tests. It's why connections refused. The db container starts first. But most times, before the db gets initialized the tests container already starts and finishes faster than the db container.
Started trying this one out: https://docs.docker.com/compose/startup-order/
But permission seems to be denied.
But I found these two: https://8thlight.com/blog/dariusz-pasciak/2016/10/17/docker-compose-wait-for-dependencies.html
https://github.com/dadarek/docker-wait-for-dependencies
I tested it, it works. But not consistently. What I need is that to docker-compose run db in the background. I'm still trying to figure that one out.