Skip to content

Commit

Permalink
Completely update everything based on the few things I've learned since
Browse files Browse the repository at this point in the history
  • Loading branch information
philgyford committed Feb 20, 2021
1 parent 07a8053 commit d436024
Show file tree
Hide file tree
Showing 23 changed files with 328 additions and 422 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
.coverage
.env
htmlcov
27 changes: 19 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
FROM python:3.6-slim
FROM python:3.8-alpine

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1
ENV PYTHONUNBUFFERED 1

WORKDIR /app
RUN apk update && apk add --no-cache \
# Required for installing/upgrading postgres, Pillow, etc:
gcc python3-dev \
# Required for installing/upgrading postgres:
postgresql-libs postgresql-dev musl-dev

# Uncomment this when https://github.com/pypa/pipenv/issues/2924 is resolved:
#RUN pip install --upgrade pip
RUN pip install pipenv
COPY Pipfile /app/
RUN pipenv install --skip-lock --system --dev
# Set work directory
RUN mkdir /code
WORKDIR /code

COPY . /app/
# Install dependencies into a virtualenv
RUN pip install --upgrade pipenv
COPY ./Pipfile .
COPY ./Pipfile.lock .
RUN pipenv install --dev --deploy

# Copy project code
COPY . /code/
12 changes: 5 additions & 7 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ verify_ssl = true
name = "pypi"

[dev-packages]
django-debug-toolbar = "==1.10.1"
coverage = "==4.5.1"
# Any packages required only for development should go here.

[packages]
dj-database-url = "==0.5.0"
Django = "==2.1.2"
gunicorn = "==19.9.0"
psycopg2 = "==2.7.5"
Django = ">=3.1, <3.2"
gunicorn = ">=20, <21"
psycopg2 = ">=2, <3"

[requires]
python_version = "3.6"
python_version = "3.8"
151 changes: 38 additions & 113 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d436024

Please sign in to comment.