2019-04-16 19:36:38 +02:00
|
|
|
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7
|
2019-02-09 19:42:36 +04:00
|
|
|
|
:sparkles: Add Items (crud, models, endpoints), utils, refactor (#14)
* Update CRUD utils to use types better.
* Simplify Pydantic model names, from `UserInCreate` to `UserCreate`, etc.
* Upgrade packages.
* Add new generic "Items" models, crud utils, endpoints, and tests. To facilitate re-using them to create new functionality. As they are simple and generic (not like Users), it's easier to copy-paste and adapt them to each use case.
* Update endpoints/*path operations* to simplify code and use new utilities, prefix and tags in `include_router`.
* Update testing utils.
* Update linting rules, relax vulture to reduce false positives.
* Update migrations to include new Items.
* Update project README.md with tips about how to start with backend.
2019-04-19 09:45:23 +04:00
|
|
|
RUN pip install celery~=4.3 passlib[bcrypt] tenacity requests emails "fastapi>=0.16.0" uvicorn gunicorn pyjwt python-multipart email_validator jinja2 psycopg2-binary alembic SQLAlchemy
|
2019-02-09 19:42:36 +04:00
|
|
|
|
|
|
|
# For development, Jupyter remote kernel, Hydrogen
|
|
|
|
# Using inside the container:
|
2019-04-24 22:45:20 +04:00
|
|
|
# jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
|
2019-02-09 19:42:36 +04:00
|
|
|
ARG env=prod
|
2019-04-24 22:45:20 +04:00
|
|
|
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyterlab ; fi"
|
2019-02-09 19:42:36 +04:00
|
|
|
EXPOSE 8888
|
|
|
|
|
|
|
|
COPY ./app /app
|
|
|
|
WORKDIR /app/
|
|
|
|
|
|
|
|
ENV PYTHONPATH=/app
|
|
|
|
|
|
|
|
EXPOSE 80
|