nuxsmin / docker-syspass

Docker stuff for running sysPass on Docker
GNU General Public License v3.0
39 stars 21 forks source link

docker containers start in wrong order #18

Closed JamesUoM closed 5 years ago

JamesUoM commented 6 years ago

After a reboot the dockers container start in the wrong order and Syspass can't access the database.

I believe this can be fixed by simply adding a dependency in the docker-compose file:

app:
  ...
  depends_on:
      - db
JamesUoM commented 6 years ago

it seems links: should do this and more. Maybe a race condition then where the db takes too long to start?

nuxsmin commented 6 years ago

@JamesUoM it'd rather be an IP address issue, since sysPass sets its own IP address when setting up the database. It also sets the container's name on this step.

This is so because the database user is tightly coupled with sysPass IP address or DNS name, so if you set % as the host part on mysql, it won't fail.

Regards