Open thomasschmit opened 9 years ago
Hi @thomasschmit,
May be because our Dockerfile is a "full stack" image. We didn't split functionality in different images.
We known it's not a best practice. But this image is create to be able to test Cozy Cloud quickly.
In the future, we can separate CouchDB, Cozy and Nginx. And to do that you need to "connect" your containers.
You can have a look at obigroup work who started to make a docker-compose recipe : https://forum.cozy.io/t/deployer-cozy-avec-docker-et-des-containers-autonomes/468 (It is in french, but the recipe speaks for itself :))
@thomasschmit You need to remove the -only-exposed flag on docker-gen
Hi @nledez
Is there any update regarding the step of splitting the image ?
@hugoliv I think you should have a look at this thread: https://forum.cozy.io/t/docker-smaller-images/1162
Just to share I use cozy with nginx proxy (even with https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion) and it works fine. I remember I had to disable SSL (cozy side) to let the nginx proxy add the SSL layer.
My docker-compose file :
image: cozy/full
container_name: cozy
restart: always
links:
- nginx-gen
environment:
- VIRTUAL_NETWORK=1
- VIRTUAL_HOST=cloud.x.y
- VIRTUAL_NETWORK=nginx-proxy
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=cloud.x.y
- LETSENCRYPT_EMAIL=postmaster@x.y
- DISABLE_SSL=true
volumes:
- "cozy-etc:/etc/cozy"
- "cozy-local:/usr/local/cozy"
- "cozy-var:/usr/local/var/cozy/"
- "cozy-couchdb:/var/lib/couchdb"
Hope this helps.
It doesn't work when using the
jwilder/nginx-proxy
container (http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/) and launchingdocker run --name cozy -d -e VIRTUAL_HOST=cloud.example.net --restart always cozy
.Do you know why ?