Skip to content

Commit

Permalink
Added Dockerfile and .dockerignore
Browse files Browse the repository at this point in the history
  • Loading branch information
jcadam14 committed Jan 19, 2024
1 parent fb84d00 commit 02df4ef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/__pycache__/
**/.coverage
**/README
**/coverage.xml
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:3.11-alpine

WORKDIR /usr/app

RUN pip install poetry

COPY poetry.lock pyproject.toml alembic.ini ./

RUN poetry config virtualenvs.create false
RUN poetry install --no-root

COPY ./src ./src
COPY ./db_revisions ./db_revisions

WORKDIR /usr/app/src

EXPOSE 8888

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8888"]

0 comments on commit 02df4ef

Please sign in to comment.