uvdesk / community-skeleton

UVdesk Opensource Community Helpdesk Project built for all to make a Full Ticketing Support System along with many more other features.
https://www.uvdesk.com
Open Software License 3.0
8.96k stars 463 forks source link

mysql connection gets failed when deploy with docker #227

Closed vaishaliwebkul closed 4 years ago

vaishaliwebkul commented 4 years ago

Description

I'm trying to deploy helpdesk code with docker but mysqladmin: connect to a server at 'localhost' failed

How to reproduce

  1. Install project via -composer create-project uvdesk/community-skeleton helpdesk-project

  2. Follow steps as mention in README.md file

-create image-> $ docker build -t uvdesk-docker . -deploy using container

If you wish to use a local database within container $ docker run -dit -p 8003:80 \ -e MYSQL_USER=uvdesk \ -e MYSQL_ROOT_PASSWORD=uvdesk \ -e MYSQL_PASSWORD=uvdesk123 \ -e MYSQL_DATABASE=uvdesk-demo \ --name uvdesk uvdesk-docker

  1. docker logs

Screenshot from 2019-11-08 17-22-00

ghost commented 4 years ago

try

$ docker run -dit -p 8003:80 
-e MYSQL_USER = uvdesk 
-e MYSQL_ROOT_PASSWORD = uvdesk 
-e MYSQL_PASSWORD = uvdesk123 
-e MYSQL_DATABASE = uvdesk-demo
--host net
--name uvdesk uvdesk-docker