Skip to content

Commit d05ca2f

Browse files
committed
Add dockerfile
1 parent e159366 commit d05ca2f

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM tiangolo/uvicorn-gunicorn:python3.8
2+
3+
# Install Poetry
4+
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
5+
cd /usr/local/bin && \
6+
ln -s /opt/poetry/bin/poetry && \
7+
poetry config virtualenvs.create false
8+
9+
# Copy using poetry.lock* in case it doesn't exist yet
10+
COPY ./app/pyproject.toml ./app/poetry.lock* /app/
11+
12+
RUN poetry install --no-root --no-dev
13+
14+
COPY ./app /app

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
66
license = "MIT"
77

88
[tool.poetry.dependencies]
9-
python = "^3.9"
9+
python = "^3.8"
1010
strawberry-graphql = "^0.44.12"
1111
uvicorn = "^0.13.3"
1212
starlette = "^0.14.1"

0 commit comments

Comments
 (0)