Skip to content

Commit

Permalink
config flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Penny authored and Penny committed Oct 27, 2024
1 parent 50f8050 commit 6273aaa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ LABEL maintainer="pfb"
ENV PYTHONUNBUFFERED=1

COPY ./requirements.txt /tmp/requirements.txt
COPY ./requirements.dev.txt /tmp/requirements.dev.txt
COPY ./app /app
WORKDIR /app
EXPOSE 8000

ARG DEV=false
RUN python -m venv /py && \
/py/bin/pip install --upgrade pip && \
/py/bin/pip install -r /tmp/requirements.txt && \
if [ $DEV = "true" ]; \
then /py/bin/pip install -r /tmp/requirements.dev.txt; \
fi && \
rm -rf /tmp && \
adduser \
--disabled-password \
Expand Down
6 changes: 6 additions & 0 deletions app/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
exclude =
migrations,
__pycache__,
manage.py,
settings.py
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ services:
app:
build:
context: .
args:
- DEV=true
ports:
- "8000:8000"
volumes:
Expand Down
1 change: 1 addition & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake8>=3.9.2,<3.10

0 comments on commit 6273aaa

Please sign in to comment.