Installation using Docker Run: No database connection, check your database credentials in your configuration file

Brief Description

I tried installing leantime on a DigitalOcean droplet following the quick installation guide. However, after following the instructions under Full set up with MySQL and network and visiting the /install page, the following text is displayed:

No database connection, check your database credentials in your configuration file.

What I Did

I created a Docker Droplet (Docker CE v19.03.12, Docker Compose v1.22.0, Ubuntu 20.04) from DigitalOcean. (1vCPU, 1GB RAM) Then, I ran the following commands as per instruction.

# 1. Create the network so Leantime can communicate with the MySql container.
docker network create leantime-net
# 2. Create the MySQL container.
docker run -d -p 3306:3306 --network leantime-net \
-e MYSQL_ROOT_PASSWORD=321.qwerty \
-e MYSQL_DATABASE=leantime \
-e MYSQL_USER=admin \
-e MYSQL_PASSWORD=321.qwerty \
--name mysql_leantime mysql:5.7 --character-set-server=utf8 --collation-server=utf8_unicode_ci
# 3. Create the Leantime container.
docker run -d -p 80:80 --network leantime-net \
-e DB_HOST=mysql_leantime \
-e MYSQL_USER=admin \
-e MYSQL_PASSWORD=321.qwerty \
-e MYSQL_DATABASE=leantime \
--name leantime leantime/leantime:latest

Then, I visited the xx.xx.xx.xx/install page with Chrome, and got the following error message:

No database connection, check your database credentials in your configuration file.

Any suggestions would be greatly appreciated. Thanks! :smile:

I have also tried creating a droplet with 18.04 LTS and manually installed Docker. Running the same commands, I still get the same message:

No database connection, check your database credentials in your configuration file.