cozy-labs / cozy-docker

Dockerfile to build an official Cozy image
44 stars 26 forks source link

Problem with jwilder/nginx-proxy #1

Open thomasschmit opened 9 years ago

thomasschmit commented 9 years ago

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 launching docker run --name cozy -d -e VIRTUAL_HOST=cloud.example.net --restart always cozy.

Do you know why ?

nledez commented 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.

Kloadut commented 9 years ago

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 :))

izissise commented 9 years ago

@thomasschmit You need to remove the -only-exposed flag on docker-gen

hugoliv commented 8 years ago

Hi @nledez

Is there any update regarding the step of splitting the image ?

frankrousseau commented 8 years ago

@hugoliv I think you should have a look at this thread: https://forum.cozy.io/t/docker-smaller-images/1162

jcnoir commented 8 years ago

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.