Skip to content

Commit

Permalink
fix issues created with docker
Browse files Browse the repository at this point in the history
  • Loading branch information
matin committed Oct 2, 2019
1 parent 109d8b4 commit cb9d789
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ MAINTAINER Cuenca <dev@cuenca.com>
# Install app
ADD Makefile requirements.txt /speid/
WORKDIR /speid
RUN pip install -q --upgrade pip
RUN pip install --quiet gunicorn
RUN pip install -qU pip
RUN pip install -q gunicorn
RUN make install

# Add repo contents to image
Expand Down
22 changes: 10 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
SHELL := bash
PATH := ./venv/bin:${PATH}
DOCKER = docker-compose run --rm
PYTHON = python3.7
PROJECT = speid
isort = isort -rc -ac $(PROJECT) tests
black = black -S -l 79 --target-version py37 $(PROJECT) tests
PYTHON = python3.7
DOCKER = docker-compose run --rm $(PROJECT)
ISORT = venv/bin/isort -rc -ac $(PROJECT) tests
BLACK = venv/bin/black -S -l 79 --target-version py37 $(PROJECT) tests



Expand All @@ -16,17 +15,16 @@ install-dev: install

venv:
$(PYTHON) -m venv --prompt speid venv
source venv/bin/activate
pip install -qU pip
venv/bin/pip install -qU pip

format:
$(isort)
$(black)
$(ISORT)
$(BLACK)

lint:
flake8 $(PROJECT) tests setup.py
$(isort) --check-only
$(black) --check
venv/bin/flake8 $(PROJECT) tests setup.py
$(ISORT) --check-only
$(BLACK) --check

clean-pyc:
find . -name '__pycache__' -exec rm -r "{}" +
Expand Down

0 comments on commit cb9d789

Please sign in to comment.