jupyter / nbviewer

nbconvert as a web service: Render Jupyter Notebooks as static web pages
https://nbviewer.jupyter.org
Other
2.18k stars 544 forks source link

Nbviewer server not reachable with docker #815

Open leon1995 opened 5 years ago

leon1995 commented 5 years ago

Hi guys.

Im using nbviewer and a jupyter notebook server behind a nginx proxy.

Docker-compose file:

version: '2'

services:
  jupyter:
    image: jupyter/datascience-notebook
    container_name: jupyter
    volumes:
      - path:path
    environment:
      - VIRTUAL_HOST=jupyter.domain.toplvl
      - VIRTUAL_NETWORK=nginx-proxy
      - VIRTUAL_PORT=8888
      - LETSENCRYPT_HOST=jupyter.domain.toplvl
      - LETSENCRYPT_EMAIL=mail@domain.toplvl
    networks:
      - proxy-tier
    restart: always

  nbviewer:
    image: jupyter/nbviewer
    container_name: nbviewer
    volumes:
      - path/from/jupyter/notebooks:path
    environment:
      - VIRRTUAL_HOST=nbviewer.domain.toplvl
      - VIRTUAL_NETWORK=nginx-proxy
      - VIRTUAL_PORT=8080
      - LETSENCRYPT_HOST=nbviewer.domain.toplvl
      - LETSENCRYPT_EMAIL=mail@domain.toplvl
    networks:
      - proxy-tier
    restart: always

networks:
  proxy-tier:
    external:
      name: proxy-nginx

$ docker-compose up -d works and I get no errors. But when I go to nbviewer.domain.toplvl I get a 503 error. jupyter.domain.toplvl works.

$ docker logs nbviewer
[I 190104 09:25:55 app:124] Not indexing notebooks
[I 190104 09:25:55 app:144] Using in-memory cache
[I 190104 09:25:55 app:347] Listening on 0.0.0.0:8080, path /

I hope someone can help me :)

EDIT: I have other services running like other webserver and a letsencrypt container. They work normaly EDIT: Added docker logs nbviewer

parente commented 5 years ago

The 503 error is probably coming from nginx if it's not appearing in the nbviewer log. It sounds like however nginx is configured, it is unable to reach the nbviewer instance.

We're starting to experiment with a general Q&A section on https://discourse.jupyter.org/c/questions to see if cross-technology questions like this one catch more attention from a broader community audience. You might try re-posting your question over there to see if someone with more experience in this topic can help.