cesium-ml / cesium_web

Cesium Web Frontend
Other
43 stars 18 forks source link

Error when running with docker #260

Closed minhduc0711 closed 4 years ago

minhduc0711 commented 4 years ago

Hi, I'm getting errors when starting the Docker containers. I think it has something to do with the postgres password being blank in docker-compose.yaml.

Creating cesium-ml_db_1 ... done
Creating cesium-ml_web_1 ... error

ERROR: for cesium-ml_web_1  Cannot start service web: Cannot link to a non running container: /cesium-ml_db_1 AS /cesium-ml_web_1/cesium-ml_db_1

ERROR: for web  Cannot start service web: Cannot link to a non running container: /cesium-ml_db_1 AS /cesium-ml_web_1/cesium-ml_db_1
ERROR: Encountered errors while bringing up the project.
stefanv commented 4 years ago

Hi @minhduc0711, thank you for the report. Could you please provide the output of docker logs?

It indeed sounds as if there is a problem with the database container.

minhduc0711 commented 4 years ago

@stefanv here's the output of docker-compose logs

Attaching to cesium-ml_web_1, cesium-ml_db_1
db_1   | Error: Database is uninitialized and superuser password is not specified.
db_1   |        You must specify POSTGRES_PASSWORD to a non-empty value for the
db_1   |        superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
db_1   | 
db_1   |        You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
db_1   |        connections without a password. This is *not* recommended.
db_1   | 
db_1   |        See PostgreSQL documentation about "trust":
db_1   |        https://www.postgresql.org/docs/current/auth-trust.html

I tried adding POSTGRES_HOST_AUTH_METHOD=trust to docker-compose.yaml as well, then the web container would raise a bunch of errors.

stefanv commented 4 years ago

Thanks, @minhduc0711. I've updated the docker-related files in 6dd9977ff037982d50f740bfb62012b508eebd29 and uploaded a new image to Docker Hub.