From 12fd233338c90b4ef158fa6b18562e68d854a182 Mon Sep 17 00:00:00 2001 From: Ambrus Simon Date: Thu, 14 Dec 2017 14:38:47 +0100 Subject: [PATCH] Rebase, uwsgi cleanup, py-openssl fix, re-add inject_build_info --- Dockerfile | 8 +++--- bin/api.wsgi | 4 --- docker/inject_build_info.sh | 41 +++++++---------------------- docker/requirements-docker.txt | 4 --- docker/uwsgi-config.ini | 8 ------ docker/uwsgi-entrypoint.sh | 48 ---------------------------------- requirements.txt | 8 +++--- 7 files changed, 19 insertions(+), 102 deletions(-) delete mode 100644 bin/api.wsgi delete mode 100644 docker/requirements-docker.txt delete mode 100644 docker/uwsgi-config.ini delete mode 100755 docker/uwsgi-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 2a9fd085e..d2ef11ea5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,15 +12,13 @@ RUN ./configure --prefix=/usr/local --modules=lib --state=/var/local/unit --pid= FROM python:2.7-alpine3.6 as dist -RUN apk add --no-cache git +RUN apk add --no-cache build-base git py-openssl COPY --from=build /usr/local/sbin/unitd /usr/local/sbin/unitd COPY --from=build /usr/local/lib/python.unit.so /usr/local/lib/python.unit.so EXPOSE 80 8080 27017 - VOLUME /data/db - WORKDIR /src/core COPY docker/unit.json /var/local/unit/conf.json @@ -32,6 +30,10 @@ RUN pip install -e . CMD ["unitd", "--control", "*:8080", "--no-daemon", "--log", "/dev/stdout"] +ARG BRANCH_LABEL=NULL +ARG COMMIT_HASH=0 +RUN docker/inject_build_info.sh $BRANCH_LABEL $COMMIT_HASH + FROM dist as testing diff --git a/bin/api.wsgi b/bin/api.wsgi deleted file mode 100644 index 5c2168a53..000000000 --- a/bin/api.wsgi +++ /dev/null @@ -1,4 +0,0 @@ -# vim: filetype=python -from api.web import start - -application = start.app_factory() diff --git a/docker/inject_build_info.sh b/docker/inject_build_info.sh index cd68e40be..3cebb6a90 100755 --- a/docker/inject_build_info.sh +++ b/docker/inject_build_info.sh @@ -1,32 +1,11 @@ -#!/bin/bash -( - -set -e - -# Set cwd -unset CDPATH -cd "$( dirname "${BASH_SOURCE[0]}" )" - -# Dump the build info into version.json so it can be displayed in the footer -# of the site pages. - -# { -# "commit": "5683785e8cd6efdfd794a79828b2cccd2424ed21", -# "timestamp": "January 12, 2016 at 2:46:23 PM CST", -# "branch": "ng-constant" -# } - - - BRANCH_NAME=${1} - COMMIT_HASH=${2} - BUILD_TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ") - - echo "{ - \"commit\": \"${COMMIT_HASH}\", - \"timestamp\": \"${BUILD_TIMESTAMP}\", - \"branch\": \"${BRANCH_NAME}\" -}" > version.json - +#!/usr/bin/env sh + +set -eu +cat > version.json <=1.11.0,<1.12.0 elasticsearch==5.3.0 enum34==1.1.6 +git+https://github.com/flywheel-io/gears.git@v0.1.4#egg=gears +ipython jsonschema==2.6.0 -Markdown==2.6.5 +markdown==2.6.5 pymongo==3.2 -pyOpenSSL >=17.1.0,<18.0 python-dateutil==2.4.2 pytz==2015.7 requests==2.9.1 @@ -12,5 +13,4 @@ rfc3987==1.3.4 strict-rfc3339==0.7 unicodecsv==0.9.0 webapp2==2.5.2 -WebOb==1.5.1 -git+https://github.com/flywheel-io/gears.git@v0.1.4#egg=gears +webob==1.5.1