Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migate to poetry for dependency management #5

Merged
merged 3 commits into from Nov 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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