Docker full install

63 views
Skip to first unread message

pierrealai...@gmail.com

unread,
Jul 13, 2015, 7:05:23 PM7/13/15
to fat-free...@googlegroups.com
Hello

i've played a bit with Docker to create a full installation of Ffcrm from a Dockerfile,
and a full installation with Docker compose with a Postgres and NginX containers

i'm almost there, but I've a fulltime job ( :D )
so i'm stuck with nginX conf (and probably not everything is ok) so if someone would like to share his knoledge and improve this with me it would be great

someone ?

https://github.com/Peh4/ffcrm_docker

known bugs :
i need to connect the Ffcrm container after the container creation to rake:migrate again the database

$ docker
exec -it peha/ffcrm bash



The dockerfile is in /ffcrm/Dockerfile
An entrypoint.sh is used to define the database password for each installation (the same as Postgres)
NginX need also a Dockerfile and stuff to customise the configuration but i've not been further with this

It's a start, we can let the user choose Sqlite or mySql configuration with the entrypoint
and probably more accessible with a single docker-compose command

Bests


Steve Kenworthy

unread,
Jul 13, 2015, 10:39:28 PM7/13/15
to fat-free...@googlegroups.com
Hi Pierre,

This is really interesting. I'm keen to get more into Docker (and docker compose) and I've done nginx setup before so happy to help and learn.

FFCRM has a Dockerfile already that builds on top of an image with passenger installed. But that is an old docker file that was built for fig (before it became docker-compose) For your case, I wonder if there is already a container that has nginx installed, perhaps already built on top of rails-latest?

Regards,
Steve

--
You received this message because you are subscribed to the Google Groups "Fat Free CRM Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fat-free-crm-d...@googlegroups.com.
To post to this group, send email to fat-free...@googlegroups.com.
Visit this group at http://groups.google.com/group/fat-free-crm-dev.
For more options, visit https://groups.google.com/d/optout.

Pierre-Alain Leboucher

unread,
Jul 14, 2015, 1:37:39 PM7/14/15
to fat-free...@googlegroups.com
I don't think nginX is already installed, and i've seen a lots of tuto where nginX has its own container. (and it seems to be a good practice to use one container for each app)

we should have some options that could be handle directly from the "docker run" command
with options such as -e DOMAIN_NAME=whatever.itis
Do you have more ideas on this ?

The question of ssl cert generation will be a bit tricky i guess.

It would be cool if the nginx.conf could handle several FFCRM containers at the same time to use DockerCompose scalability benefits
$docker-compose scale ffcrm=2

Thanks for reading

Regards,
PA

Steve Kenworthy

unread,
Jul 15, 2015, 10:40:48 PM7/15/15
to fat-free...@googlegroups.com
It might be worth seeing if it is possible to use the nginx dockerhub image as a base.


From the readme it looks possible to adapt it to your own nginx setup using Dockerfile and creating your own image. Then SSL setup should be fairly easy as it just requires copying the certs to the docker image and uploading a custom nginx.conf.

I've done nginx SSL setup before so let me know if you need a hand (but you've probably done it already!)

Once that's done, I'd be interested to know if it's possible to use DockerCompose to alter the nginx.conf setup to scale backend connections to FFCRM containers based on what you've suggested above. That's the more tricky part! Each time a new FFCRM container is added, nginx will need to add it to it's pool of workers. Not sure how to accomplish that yet.

Thanks,
Steve :)
Reply all
Reply to author
Forward
0 new messages