The docker-compose example video when explaining, they have not mentioned about the postgresl env parameter, with out giving it the container exit rather than running
pasting here the results which we get if we dont specify the environment, please check the video and append the changes needed
docker run --name=db postgres:9.4
Error: Database is uninitialized and superuser password is not specified.
You must specify POSTGRES_PASSWORD for the superuser. Use
“-e POSTGRES_PASSWORD=password” to set it in “docker run”.You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections without a password. This is *not* recommended. See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html
result because of this is the worker-app will not run, pasting the results here as reference
docker run --link redis:redis --link db:db worker-app
docker: Error response from daemon: Cannot link to a non running container: /db AS /amazing_archimedes/db.
ERRO[0000] error waiting for container: context canceled