Skip to content

Commit

Permalink
Merge pull request #1 from TogetherCrew/feature/10-create-a-python-se…
Browse files Browse the repository at this point in the history
…rvice-template-repository

Docker (Dockerfile & .dockerignore)
  • Loading branch information
cyri113 authored Jul 18, 2023
2 parents c130fde + 0259c07 commit e7dbc8f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.github/

.coverage/
.coverage
coverage

venv/
.env
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.10-alpine AS base
WORKDIR /project
COPY . .
RUN pip3 install -r requirements.txt

FROM base AS test
CMD ["python3", "-m", "coverage", "run" ,"-m", "pytest", "tests"]

FROM base AS prod-server
CMD ["python3", "server.py"]

FROM base as prod-worker
CMD ["python3", "worker.py"]

0 comments on commit e7dbc8f

Please sign in to comment.