
* 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.
24 lines
574 B
Docker
24 lines
574 B
Docker
FROM python:3.7
|
|
|
|
RUN pip install raven celery~=4.3 passlib[bcrypt] tenacity requests "fastapi>=0.16.0" emails pyjwt email_validator jinja2 psycopg2-binary alembic SQLAlchemy
|
|
|
|
# For development, Jupyter remote kernel, Hydrogen
|
|
# Using inside the container:
|
|
# jupyter notebook --ip=0.0.0.0 --allow-root
|
|
ARG env=prod
|
|
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyter ; fi"
|
|
EXPOSE 8888
|
|
|
|
ENV C_FORCE_ROOT=1
|
|
|
|
COPY ./app /app
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONPATH=/app
|
|
|
|
COPY ./app/worker-start.sh /worker-start.sh
|
|
|
|
RUN chmod +x /worker-start.sh
|
|
|
|
CMD ["bash", "/worker-start.sh"]
|