Cocolabs-SAS / cocorico-docker

The official Cocorico docker image that give you the ability to run Cocorico out of the box.
https://www.cocolabs.io/
MIT License
23 stars 48 forks source link

Cocorico http://localhost does not show the expected front end #15

Closed mgaaloul87 closed 5 years ago

mgaaloul87 commented 5 years ago

Hi, I would like to install Cocorico platform to understand how the front end looks and works. I finished the installation of the docker, pulled the cocorico docker image as indicated here (https://hub.docker.com/r/cocolabs/cocorico/) and ran the cocolabs/cocorico container using the command provided here (docker run --name cocorico -ti -p 80:80 -p 3306:3306 -p 9001:9001 -p 27017:27017 -v pwd:/cocorico -v pwd/tmp/mysql:/var/lib/mysql -v pwd/tmp/mongo:/data/db -e HOST_UID=$UID cocolabs/cocorico). After execution in the Docker terminal, a message showed "cocorico is live" and the screen was kind of stuck there. (I did not get back the "$" command in that terminal). I tried to reach the address http://localhost but it seems to show a standard Wampserver homepage. I tried to reach the address http://localhost:9001 but the page is not reachable.

Could you please provide any help to unlock the situation? Thanks

giorgio654 commented 5 years ago

Hello @mgaaloul87 , Can you close Wampserver (and ensure the http port 80 is free) and retry please? However you can also use an other port: docker run --name cocorico -ti -p 8080:80 ...

mgaaloul87 commented 5 years ago

Thanks @giorgio654. Actually exposing the container ports did not work at all. FYI, I am working on a Windows machine (8.1 Professional). So, I am running this whole installation from a virtual machine. The only way I could get the end result was by publishing all container ports (-P). That way, the docker -ps gave me a mapping between the container ports and the host machine ports. So to run the cocorico front end, instead of using the http://localhost:80, I am using the IP address of the host machine (http:192.168.99.100:port given in the mapping). I had also to change the parameters.yml file so all of that could work. Needless to say it, but it was a pain in the a**! Still something weird, when I used -P to publish all ports, the docker mapped the 80/tcp, 3306/tcp and 27017/tcp ports but not 9001/tcp at all...I don't know what's the impact of that. Will that block the admin access?

giorgio654 commented 5 years ago

Hello @mgaaloul87 , The edition of this parameter in app/config/parameters.yml can resolve your issue: cocorico.assets_base_urls: 'http:192.168.99.100' with the appropriate HTTP port.

16