-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from freezingsaddles/update-requirements-fix-build
Update requirements and fix build
- Loading branch information
Showing
7 changed files
with
62 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,38 @@ | ||
# BUILD | ||
# ===== | ||
FROM ubuntu:22.04 as buildstep | ||
LABEL maintainer="Richard Bullington-McGuire <[email protected]>" | ||
|
||
FROM ubuntu:xenial as buildstep | ||
LABEL maintainer="Hans Lellelid <[email protected]>" | ||
|
||
COPY resources/docker/sources.list /etc/apt/sources.list | ||
RUN apt-get update | ||
|
||
RUN apt-get install -y software-properties-common | ||
RUN add-apt-repository -y ppa:jonathonf/python-3.6 | ||
RUN apt-get update | ||
|
||
RUN apt-get install -y python3.6 python3.6-dev curl build-essential git | ||
RUN apt-get update \ | ||
&& apt-get install -y software-properties-common \ | ||
&& apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-dev python3-pip curl build-essential git tzdata | ||
|
||
RUN mkdir -p /build/wheels | ||
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6 | ||
|
||
RUN pip3 install --upgrade pip setuptools wheel | ||
|
||
ADD requirements.txt /tmp/requirements.txt | ||
RUN pip3 wheel -r /tmp/requirements.txt --wheel-dir=/build/wheels | ||
|
||
ADD . /app | ||
WORKDIR /app | ||
|
||
RUN python3.6 setup.py bdist_wheel -d /build/wheels | ||
|
||
RUN python3 setup.py bdist_wheel -d /build/wheels | ||
|
||
# DEPLOY | ||
# ===== | ||
|
||
FROM ubuntu:xenial as deploystep | ||
LABEL maintainer="Hans Lellelid <[email protected]>" | ||
|
||
COPY resources/docker/sources.list /etc/apt/sources.list | ||
FROM ubuntu:22.04 as deploystep | ||
LABEL maintainer="Richard Bullington-McGuire <[email protected]>" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y software-properties-common curl \ | ||
&& add-apt-repository -y ppa:jonathonf/python-3.6 \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common curl tzdata \ | ||
&& apt-get update \ | ||
&& apt-get install -y python3.6 vim-tiny --no-install-recommends \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip --no-install-recommends \ | ||
&& apt-get clean \ | ||
&& curl https://bootstrap.pypa.io/get-pip.py | python3.6 \ | ||
&& pip3 install --upgrade pip setuptools wheel \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN pip3 install --upgrade pip setuptools wheel | ||
COPY --from=buildstep /build/wheels /tmp/wheels | ||
|
||
RUN pip3 install /tmp/wheels/* | ||
|
||
EXPOSE 8000 | ||
|
||
ENTRYPOINT gunicorn --bind 0.0.0.0:8000 'freezing.nq.app:make_app()' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
black==19.10b0 | ||
flake8==3.7.9 | ||
pur==5.3.0 | ||
pytest==3.3.2 | ||
pytest-mock==1.6.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
GeoAlchemy @ https://github.com/hozn/GeoAlchemy/archive/0.7.3dev1.tar.gz | ||
arrow==0.15.5 | ||
envparse==0.2.0 | ||
falcon==1.3.0 | ||
greenstalk==0.5.0 | ||
gunicorn==19.7.1 | ||
falcon==2.0.0 | ||
freezing-model @ https://github.com/freezingsaddles/freezing-model/archive/0.7.20.tar.gz | ||
greenstalk==1.0.1 | ||
gunicorn==20.0.4 | ||
python-mimeparse==1.6.0 | ||
six==1.11.0 | ||
-e git+https://github.com/freezingsaddles/[email protected]#egg=freezing-model-0.2.2 | ||
arrow==0.12.1 | ||
six==1.14.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,38 +3,42 @@ | |
import re | ||
import warnings | ||
|
||
from pip.req import parse_requirements | ||
from setuptools import setup, find_packages | ||
from setuptools import setup | ||
|
||
version = '0.1.0' | ||
version = "0.3.6" | ||
|
||
long_description = """ | ||
freezing-nq is the freezing saddles component for receiving strava webhook events and enquing them for processing. | ||
freezing-nq is the Freezing Saddles component for receiving | ||
strava webhook events and enquing them for processing. | ||
""" | ||
|
||
# parse_requirements() returns generator of pip.req.InstallRequirement objects | ||
install_reqs = parse_requirements(os.path.join(os.path.dirname(__file__), 'requirements.txt'), session=False) | ||
|
||
# reqs is a list of requirement | ||
# e.g. ['django==1.5.1', 'mezzanine==1.4.6'] | ||
reqs = [str(ir.req) for ir in install_reqs] | ||
install_reqs = [ | ||
"envparse==0.2.0", | ||
"falcon==2.0.0", | ||
"greenstalk==1.0.1", | ||
"gunicorn==20.0.4", | ||
"python-mimeparse==1.6.0", | ||
"six==1.14.0", | ||
"freezing-model", | ||
"arrow==0.15.5", | ||
] | ||
|
||
setup( | ||
name='freezing-nq', | ||
name="freezing-nq", | ||
version=version, | ||
author='Hans Lellelid', | ||
author_email='[email protected]', | ||
url='http://github.com/freezingsaddles/freezing-nq', | ||
license='Apache', | ||
description='Freezing Saddles activity receive and enqueue worker', | ||
author="Hans Lellelid", | ||
author_email="[email protected]", | ||
url="http://github.com/freezingsaddles/freezing-nq", | ||
license="Apache", | ||
description="Freezing Saddles activity receive and enqueue worker", | ||
long_description=long_description, | ||
packages=['freezing.nq', 'freezing.nq.api'], | ||
install_requires=reqs, | ||
packages=["freezing.nq", "freezing.nq.api"], | ||
install_requires=install_reqs, | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python :: 3', | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
], | ||
zip_safe=True | ||
zip_safe=True, | ||
) |