Skip to content

Commit

Permalink
Merge pull request #5 from nickbabcock/poetry
Browse files Browse the repository at this point in the history
 Migate to poetry for dependency management
  • Loading branch information
nickbabcock committed Nov 2, 2018
2 parents 0615555 + 9d651a7 commit aaa9b50
Show file tree
Hide file tree
Showing 8 changed files with 259 additions and 206 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -9,9 +9,10 @@ matrix:
- env: PYTHON=2.7
- env: PYTHON=3.5
- env: PYTHON=3.6
- env: PYTHON=3.7

before_install:
- docker build -t bottle-ssl --build-arg PYTHON_VERSION=${PYTHON} .

script:
- docker run -ti bottle-ssl pipenv run py.test
- docker run -ti bottle-ssl poetry run py.test
9 changes: 5 additions & 4 deletions Dockerfile
Expand Up @@ -3,11 +3,12 @@ FROM python:${PYTHON_VERSION}
RUN useradd -r --no-user-group BottleUser && \
echo BottleUser:iambottle | chpasswd
WORKDIR /app
RUN openssl req -new -x509 -days 365 -nodes -out cacert.pem -keyout privkey.pem -subj "/C=AA/ST=State/L=Location/O=IT/CN=bottle-ssl.com"
COPY Pipfil* /app/
RUN pip install pipenv && pipenv install --dev
RUN bash -c "openssl req -x509 -nodes -keyout privkey.pem -new -out cacert.pem -subj /CN=localhost -reqexts SAN -extensions SAN -config <(cat /usr/lib/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:localhost')) -sha256 -days 3650"
COPY poetry.lock /app/.
COPY pyproject.toml /app/.
RUN pip install poetry && poetry install
COPY *.py ./
COPY index.html .

EXPOSE 443
CMD ["pipenv", "run", "python", "main.py"]
CMD ["poetry", "run", "python", "main.py"]
12 changes: 0 additions & 12 deletions Pipfile

This file was deleted.

181 changes: 0 additions & 181 deletions Pipfile.lock

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -33,7 +33,7 @@ linux server and remember the user through the use of a cookie.
- [Beaker][beaker]: Will be used as Bottle middleware that allows session data.
- [OpenSSL][openssl]: Program used to generate the self signed certificate.

Before you [`pipenv install`](http://docs.pipenv.org/en/latest/) the python
Before you [`poetry install`](https://github.com/sdispater/poetry) the python
dependencies you will need to install Openssl (most likely with the command
`sudo apt-get install openssl`)

Expand Down

0 comments on commit aaa9b50

Please sign in to comment.