Skip to content

Commit

Permalink
Rebase, uwsgi cleanup, py-openssl fix, re-add inject_build_info
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrussimon committed Dec 14, 2017
1 parent 8d16ce6 commit 12fd233
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 102 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
4 changes: 0 additions & 4 deletions bin/api.wsgi

This file was deleted.

41 changes: 10 additions & 31 deletions docker/inject_build_info.sh
Original file line number Diff line number Diff line change
@@ -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 <<EOF
{
"branch": "$1",
"commit": "$2",
"timestamp": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
}
EOF
cat version.json

)
4 changes: 0 additions & 4 deletions docker/requirements-docker.txt

This file was deleted.

8 changes: 0 additions & 8 deletions docker/uwsgi-config.ini

This file was deleted.

48 changes: 0 additions & 48 deletions docker/uwsgi-entrypoint.sh

This file was deleted.

8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
django>=1.11.0,<1.12.0
elasticsearch==5.3.0
enum34==1.1.6
git+https://github.com/flywheel-io/[email protected]#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
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/[email protected]#egg=gears
webob==1.5.1

0 comments on commit 12fd233

Please sign in to comment.