Browse Source

⬆️ Upgrade Jupyter to use Lab, update util/env var for local development

pull/13907/head
Sebastián Ramírez 6 years ago
parent
commit
47e0fe56e3
  1. 4
      {{cookiecutter.project_slug}}/backend/backend.dockerfile
  2. 4
      {{cookiecutter.project_slug}}/backend/celeryworker.dockerfile
  3. 4
      {{cookiecutter.project_slug}}/backend/tests.dockerfile
  4. 6
      {{cookiecutter.project_slug}}/docker-compose.dev.env.yml

4
{{cookiecutter.project_slug}}/backend/backend.dockerfile

@ -4,9 +4,9 @@ RUN pip install celery~=4.3 passlib[bcrypt] tenacity requests emails "fastapi>=0
# For development, Jupyter remote kernel, Hydrogen # For development, Jupyter remote kernel, Hydrogen
# Using inside the container: # Using inside the container:
# jupyter notebook --ip=0.0.0.0 --allow-root # jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
ARG env=prod ARG env=prod
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyter ; fi" RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyterlab ; fi"
EXPOSE 8888 EXPOSE 8888
COPY ./app /app COPY ./app /app

4
{{cookiecutter.project_slug}}/backend/celeryworker.dockerfile

@ -4,9 +4,9 @@ RUN pip install raven celery~=4.3 passlib[bcrypt] tenacity requests "fastapi>=0.
# For development, Jupyter remote kernel, Hydrogen # For development, Jupyter remote kernel, Hydrogen
# Using inside the container: # Using inside the container:
# jupyter notebook --ip=0.0.0.0 --allow-root # jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
ARG env=prod ARG env=prod
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyter ; fi" RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyterlab ; fi"
EXPOSE 8888 EXPOSE 8888
ENV C_FORCE_ROOT=1 ENV C_FORCE_ROOT=1

4
{{cookiecutter.project_slug}}/backend/tests.dockerfile

@ -4,9 +4,9 @@ RUN pip install requests pytest tenacity passlib[bcrypt] "fastapi>=0.16.0" psyco
# For development, Jupyter remote kernel, Hydrogen # For development, Jupyter remote kernel, Hydrogen
# Using inside the container: # Using inside the container:
# jupyter notebook --ip=0.0.0.0 --allow-root # jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
ARG env=prod ARG env=prod
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyter ; fi" RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyterlab ; fi"
EXPOSE 8888 EXPOSE 8888
COPY ./app /app COPY ./app /app

6
{{cookiecutter.project_slug}}/docker-compose.dev.env.yml

@ -2,13 +2,13 @@ version: '3.3'
services: services:
backend: backend:
environment: environment:
- 'JUPYTER=jupyter notebook --ip=0.0.0.0 --allow-root' - JUPYTER=jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
- SERVER_HOST=http://${DOMAIN} - SERVER_HOST=http://${DOMAIN}
celeryworker: celeryworker:
environment: environment:
- RUN=celery worker -A app.worker -l info -Q main-queue -c 1 - RUN=celery worker -A app.worker -l info -Q main-queue -c 1
- JUPYTER=jupyter notebook --ip=0.0.0.0 --allow-root - JUPYTER=jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
- SERVER_HOST=http://${DOMAIN} - SERVER_HOST=http://${DOMAIN}
backend-tests: backend-tests:
environment: environment:
- JUPYTER=jupyter notebook --ip=0.0.0.0 --allow-root - JUPYTER=jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888

Loading…
Cancel
Save