gamonoid / icehrm

Manage your employees easily with a robust and efficient Human Resource Management System
http://icehrm.com
Other
593 stars 374 forks source link

Docker container became unhealthy #255

Open ayan013 opened 3 years ago

ayan013 commented 3 years ago

Hi,

I have installed icehrm in my ubuntu machine but after running the container, icehrm_icehrm-prod_1 became unhealthy within few mins. I have restarted the container but the issue remains same. Can anyone please help on this.

When I started the container

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES fc448f3c8d7f mysql:5.7 "docker-entrypoint.s…" 9 minutes ago Up 22 seconds 0.0.0.0:3306->3306/tcp, 33060/tcp icehrm_mysql-prod_1 92a806310929 icehrm_icehrm-worker "/bin/sh -c '/usr/sb…" 9 minutes ago Up 21 seconds icehrm_icehrm-worker_1 cbffe4dfef3f icehrm_icehrm-prod "/usr/bin/supervisor…" 9 minutes ago Up 23 seconds (health: starting) 0.0.0.0:8070->8070/tcp icehrm_icehrm-prod_1

After running few mins.

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES fc448f3c8d7f mysql:5.7 "docker-entrypoint.s…" 11 minutes ago Up About a minute 0.0.0.0:3306->3306/tcp, 33060/tcp icehrm_mysql-prod_1 92a806310929 icehrm_icehrm-worker "/bin/sh -c '/usr/sb…" 11 minutes ago Up About a minute icehrm_icehrm-worker_1 cbffe4dfef3f icehrm_icehrm-prod "/usr/bin/supervisor…" 11 minutes ago Up About a minute (unhealthy) 0.0.0.0:8070->8070/tcp icehrm_icehrm-prod_1

Please help me to identify the issue.

Thanks,

sManWorks commented 3 years ago

This annoyed me like crazy so I dug in a little deeper. To fix this, in the Dockerfile-prod file, change the port in

HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8071/fpm-ping

to

HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8070/fpm-ping