-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard website use case examples please #928
Comments
Here is our fig.yml config for the Nginx + uWSGI + Django + PostgreSQL scenario you mentioned. As you can see some parts are commented our since Docker Compose doesn't handle different development environment very well. |
@Starefossen Yes it's close to what I've done. I like your |
The /bin/true is nice but if you are to use that trick you are better off using the tianon/true:latest image. That image does not contain any software whatsoever and is lightweight enough for that purpose. |
@jmlagace Yes tianon/true is good for volume-only containers, my point of using the trick is for example to use a Gradle or a PhantomJS container images directly (build/test containers linked to other containers). |
I think it would be a good idea to link to more examples. This has come up before with #669 The question of how to make a database container when the table schemas are in code (ex: with django and rails), is asked frequently. Another django example: readthedocs/readthedocs.org#1133 |
If anyone has examples they'd like featured, please comment in #1951 |
Issue grooming: https://docs.docker.com/compose/gettingstarted/ has links (at the end) to Django, Wordpress & rails quickstart examples and in general I think the docs/examples story around |
Could at least the basics be a bit better covered? The example given is a toy example, not a production example. Problems I find with this example are:
So I'd really wish there could be couple of standard examples for standard simple websites:
Those example should allow simple development (edit file and reload page), build (run tests), deploy for production (restart services, multiple processes, safe...), and backup DB.
Note: I've done that for the first two cases by mounting volumes as it's a lot faster to develop (and deploy) than using
ADD . /code
, however I agree that it's less clean and my solution makes it hard to have development build and run tests without impacting deployed Dockers using the samefig.yml
.Related to this is a thread on single vs multi-docker, which means often either building like a VM (usually using phusion's buntu or often supervisor which has PID 1 problem) or using Docker like executable that run on your mounted volumes.
My hopes are that Docker Compose (moby/moby#9694 and moby/moby#9459) starts off people with the right foot.
The text was updated successfully, but these errors were encountered: