Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Updated backend.dockerfile to work with new base image python:3.6 #20

Merged
merged 3 commits into from
Jan 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions {{cookiecutter.project_slug}}/backend/backend.dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.6

# Dependencies for Couchbase
RUN wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add -
RUN echo "deb http://packages.couchbase.com/ubuntu stretch stretch/main" > /etc/apt/sources.list.d/couchbase.list
RUN apt-get update && apt-get install -y libcouchbase-dev libcouchbase2-bin build-essential
RUN wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add - && \
OS_CODENAME=`cat /etc/os-release | grep VERSION_CODENAME | cut -f2 -d=` && \
echo "deb http://packages.couchbase.com/ubuntu ${OS_CODENAME} ${OS_CODENAME}/main" > /etc/apt/sources.list.d/couchbase.list && \
apt-get update && apt-get install -y libcouchbase-dev libcouchbase2-bin build-essential

RUN pip install celery~=4.3 passlib[bcrypt] tenacity requests couchbase emails "fastapi>=0.16.0" uvicorn gunicorn pyjwt python-multipart email_validator jinja2
RUN pip install \
celery~=4.3 \
passlib[bcrypt] \
tenacity \
requests \
couchbase \
emails \
"fastapi>=0.16.0" \
uvicorn \
gunicorn \
pyjwt \
python-multipart \
email_validator \
jinja2

# For development, Jupyter remote kernel, Hydrogen
# Using inside the container:
Expand Down
7 changes: 4 additions & 3 deletions {{cookiecutter.project_slug}}/backend/tests.dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM python:3.6

RUN wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add -
RUN echo "deb http://packages.couchbase.com/ubuntu stretch stretch/main" > /etc/apt/sources.list.d/couchbase.list
RUN apt-get update && apt-get install -y libcouchbase-dev build-essential
RUN wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add - && \
OS_CODENAME=`cat /etc/os-release | grep VERSION_CODENAME | cut -f2 -d=` && \
echo "deb http://packages.couchbase.com/ubuntu ${OS_CODENAME} ${OS_CODENAME}/main" > /etc/apt/sources.list.d/couchbase.list && \
apt-get update && apt-get install -y libcouchbase-dev build-essential

RUN pip install requests pytest tenacity passlib[bcrypt] couchbase "fastapi>=0.16.0"

Expand Down