Working Dockerfile and Compose.yml, makefile docker cmd
This commit is contained in:
parent
13f10ab255
commit
bd4c0987c2
3 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
|||
FROM python:3-alpine
|
||||
RUN apk update && apk upgrade && apk add python3-pip
|
||||
RUN apk update && apk upgrade && apk add py-pip make
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN pip install -r requirements.txt
|
||||
CMD make prod
|
||||
EXPOSE 8000
|
||||
|
|
3
Makefile
3
Makefile
|
@ -11,6 +11,9 @@ check:
|
|||
python3 -m mypy flaskapp/
|
||||
python3 -m pylint flaskapp/
|
||||
|
||||
docker:
|
||||
docker build -t ${REPO_OWNER}/${REPO_OWNER_SNAKE} .
|
||||
|
||||
clean:
|
||||
rm -rf flaskapp/__pycache__
|
||||
rm -rf __pycache__
|
||||
|
|
|
@ -2,7 +2,7 @@ version: "3"
|
|||
|
||||
services:
|
||||
${REPO_NAME_SNAKE}:
|
||||
image: ${REPO_NAME_SNAKE}:latest
|
||||
image: ${REPO_OWNER}/${REPO_NAME_SNAKE}:latest
|
||||
container_name: ${REPO_NAME_SNAKE}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
|
|
Loading…
Add table
Reference in a new issue