Can't connect to foodsoft - SSL error with docker image
I've been trying to run foodsoft in production either with docker and docker-compose, going through all the issues until I obtain up and running containers, but I've not been able to connect to the app. I will open a different topic for docker-compose, here is for basic docker procedure :
Due to a Ruby issue with foodcoops/foodsoft:latest, I tried v4.6.0 wich runs smoothly
`/nonexistent` is not a directory.
Bundler will use `/tmp/bundler/home/unknown' as your home directory temporarily.
=> Booting Thin
=> Rails 4.2.10 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Loading app configuration from config/app_config.yml
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
86ffa6ee79a8 foodcoops/foodsoft:4.6.0 "./docker-entrypoint…" 25 minutes ago Up 25 minutes 0.0.0.0:32776->3000/tcp foodsoft_web
c7df8d0db12e mysql:5.5 "docker-entrypoint.s…" About an hour ago Up About an hour 3306/tcp mysql
a89ca7e475d2 redis:3.2-alpine "docker-entrypoint.s…" 13 hours ago Up 13 hours 6379/tcp foodcoopsnet_redis_1
Others are more experienced than me, but let me try to help. I do not know how to exactly reproduce your setup, so I decided to follow the official docker-compose production setup from scratch. I had some issues with the upstream instructions, so I had to add some workarounds. You can find the exact steps I did in the modified README.md here: . I followed the instruction of the sections "settings" and "initial database setup" only.
After the final command there (docker-compose restart) I am able to connect to https://localhost/ . I have to accept the self-signed certificate, of course.
If I change my setup then I can also reproduce the the error you were seeing (SSL_ERROR_RX_RECORD_TOO_LONG). By default, the ports 80 and 443 in the official docker-compose production setup are sent to the haproxy container. See here . Instead, I can directly send my request to the foodsoft container by pointing my browser to its IP and using port 3000. In my case that was http://172.23.0.11:3000/ . I queried the IP using a docker command . When pointing my browser directly to rails, the SSL error showed up.
These are the insights I wanted to share with you. I hope it helps. I can not find the docker-compose thread you have announced to start. If you are still motivated to give it another try then let me know if my modified setup solved any issues for you. In that case we should contribute fixes.
Re: Can't connect to foodsoft - SSL error with docker image
Hi Julius !
Thank you very much for this reply containing very useful informations !
I can not find the docker-compose thread you have announced to start. If you are still motivated to give it another try then let me know if my modified setup solved any issues for you. In that case we should contribute fixes.
Indeed, I did not start it yet due to my attempts to solve vanilla docker issues (worker is up but still no email). Thanks to your help I am confident I will succeed using compose too. The point is I cannot reach http://localhost:3000, even with the container's ID. I'll explain it completely in the other topic as soon as possible (I already have an apache webserver using ports 80 and 443 on my server...)
I'll try the direct link to the container's ip and tell you if it solves the SSL error. I may have already tried it without succes.