cozy-docker icon indicating copy to clipboard operation
cozy-docker copied to clipboard

Problem with jwilder/nginx-proxy

Open thomasschmit opened this issue 10 years ago • 6 comments

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 ?

thomasschmit avatar Mar 20 '15 19:03 thomasschmit

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.

nledez avatar Apr 03 '15 05:04 nledez

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

Kloadut avatar Apr 13 '15 11:04 Kloadut

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

izissise avatar Jul 12 '15 12:07 izissise

Hi @nledez

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

hugoliv avatar Nov 21 '15 17:11 hugoliv

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

frankrousseau avatar Nov 23 '15 09:11 frankrousseau

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
    - [email protected]
    - 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.

jcnoir avatar Jun 14 '16 10:06 jcnoir