Skip to content

Commit 12fd233

Browse files
committed
Rebase, uwsgi cleanup, py-openssl fix, re-add inject_build_info
1 parent 8d16ce6 commit 12fd233

7 files changed

+19
-102
lines changed

Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ RUN ./configure --prefix=/usr/local --modules=lib --state=/var/local/unit --pid=
1212

1313
FROM python:2.7-alpine3.6 as dist
1414

15-
RUN apk add --no-cache git
15+
RUN apk add --no-cache build-base git py-openssl
1616

1717
COPY --from=build /usr/local/sbin/unitd /usr/local/sbin/unitd
1818
COPY --from=build /usr/local/lib/python.unit.so /usr/local/lib/python.unit.so
1919

2020
EXPOSE 80 8080 27017
21-
2221
VOLUME /data/db
23-
2422
WORKDIR /src/core
2523

2624
COPY docker/unit.json /var/local/unit/conf.json
@@ -32,6 +30,10 @@ RUN pip install -e .
3230

3331
CMD ["unitd", "--control", "*:8080", "--no-daemon", "--log", "/dev/stdout"]
3432

33+
ARG BRANCH_LABEL=NULL
34+
ARG COMMIT_HASH=0
35+
RUN docker/inject_build_info.sh $BRANCH_LABEL $COMMIT_HASH
36+
3537

3638
FROM dist as testing
3739

bin/api.wsgi

-4
This file was deleted.

docker/inject_build_info.sh

+10-31
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,11 @@
1-
#!/bin/bash
2-
(
3-
4-
set -e
5-
6-
# Set cwd
7-
unset CDPATH
8-
cd "$( dirname "${BASH_SOURCE[0]}" )"
9-
10-
# Dump the build info into version.json so it can be displayed in the footer
11-
# of the site pages.
12-
13-
# {
14-
# "commit": "5683785e8cd6efdfd794a79828b2cccd2424ed21",
15-
# "timestamp": "January 12, 2016 at 2:46:23 PM CST",
16-
# "branch": "ng-constant"
17-
# }
18-
19-
20-
BRANCH_NAME=${1}
21-
COMMIT_HASH=${2}
22-
BUILD_TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
23-
24-
echo "{
25-
\"commit\": \"${COMMIT_HASH}\",
26-
\"timestamp\": \"${BUILD_TIMESTAMP}\",
27-
\"branch\": \"${BRANCH_NAME}\"
28-
}" > version.json
29-
1+
#!/usr/bin/env sh
2+
3+
set -eu
4+
cat > version.json <<EOF
5+
{
6+
"branch": "$1",
7+
"commit": "$2",
8+
"timestamp": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
9+
}
10+
EOF
3011
cat version.json
31-
32-
)

docker/requirements-docker.txt

-4
This file was deleted.

docker/uwsgi-config.ini

-8
This file was deleted.

docker/uwsgi-entrypoint.sh

-48
This file was deleted.

requirements.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
django>=1.11.0,<1.12.0
22
elasticsearch==5.3.0
33
enum34==1.1.6
4+
git+https://github.com/flywheel-io/[email protected]#egg=gears
5+
ipython
46
jsonschema==2.6.0
5-
Markdown==2.6.5
7+
markdown==2.6.5
68
pymongo==3.2
7-
pyOpenSSL >=17.1.0,<18.0
89
python-dateutil==2.4.2
910
pytz==2015.7
1011
requests==2.9.1
1112
rfc3987==1.3.4
1213
strict-rfc3339==0.7
1314
unicodecsv==0.9.0
1415
webapp2==2.5.2
15-
WebOb==1.5.1
16-
git+https://github.com/flywheel-io/[email protected]#egg=gears
16+
webob==1.5.1

0 commit comments

Comments
 (0)