Skip to content
docker-compose.yml 972 B
Newer Older
Pierre Ozoux's avatar
Pierre Ozoux committed
nginx:
  image: nginx
  container_name: nginx
  volumes:
    - ./nginx/conf.d:/etc/nginx/conf.d
    - ./nginx/vhost.d:/etc/nginx/vhost.d
    - ./nginx/html:/usr/share/nginx/html
    - ./nginx/certs:/etc/nginx/certs:ro
    - ./nginx/proxy.conf:/etc/nginx/proxy.conf:ro
  ports:
    - "80:80"
    - "443:443"
nginx-gen:
  image: jwilder/docker-gen
  container_name: nginx-gen
  command: "-notify-sighup nginx -watch -only-exposed -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf"
  volumes_from: [nginx]
  volumes:
    - ./nginx/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
    - /var/run/docker.sock:/tmp/docker.sock:ro
nginx-letsencrypt:
  image: jrcs/letsencrypt-nginx-proxy-companion
  container_name: nginx-letsencrypt
Pierre Ozoux's avatar
Pierre Ozoux committed
  links: [nginx-gen]
Pierre Ozoux's avatar
Pierre Ozoux committed
  volumes_from: [nginx]
  volumes:
    - ./nginx/certs:/etc/nginx/certs
    - /var/run/docker.sock:/var/run/docker.sock:ro
  environment:
    - NGINX_DOCKER_GEN_CONTAINER=nginx-gen