Skip to content

Commit

Permalink
Merge pull request #490 from HXLStandard/dev
Browse files Browse the repository at this point in the history
dev into prod for 2.2.3
  • Loading branch information
danmihaila committed Aug 21, 2024
2 parents 85d8387 + c6c6dd6 commit 9d677d7
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: They are the same.
run: sudo ln -sf /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose
- name: Building HXL Proxy image
run: docker-compose -f docker-compose-github-actions.yml build proxy
- name: Spinning up container
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-08-21 Release 2.2.3:
- update docker base image
- remove legacy deps specifiers

2024-06-06 Release 2.2.2:
- add Google Tab Manager js lib
- ability to configure GTM via env var GOOGLE_TAG_MANAGER_ID
Expand Down
51 changes: 33 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,49 @@
FROM public.ecr.aws/unocha/python:3.9
FROM public.ecr.aws/unocha/python:3.9-stable

ARG UNITD_VERSION=1.32.1-1

WORKDIR /srv/www

COPY . .

RUN apk add \
git \
libffi-dev \
unit \
unit-python3 && \
# when we use the same python as the latest alpine distro, sure
#unit \
#unit-python3 && \

RUN apk add --no-cache --upgrade --virtual .build-deps \
build-base \
git \
libffi-dev \
pcre-dev && \
mkdir -p \
/etc/services.d/hxl \
/srv/cache \
/srv/config \
/srv/output \
/var/log/proxy && \
/etc/services.d/hxl \
/srv/cache \
/srv/config \
/srv/output \
/var/log/proxy && \
mv config.py.TEMPLATE /srv/config/config.py && \
mv docker_files/hxl_run /etc/services.d/hxl/run && \
mv docker_files/app.py docker_files/app_nr.py docker_files/app_elastic.py . && \
pip3 --no-cache-dir install --upgrade \
pip \
wheel && \
pip \
wheel && \
pip3 install --upgrade -r requirements.txt && \
pip3 install \
elastic-apm[flask] \
newrelic && \
apk del \
git \
libffi-dev && \
elastic-apm[flask] && \
cd /tmp && \
git clone https://github.com/nginx/unit && \
cd /tmp/unit && \
git checkout ${UNITD_VERSION} && \
./configure && make && make install && \
./configure python && make python && make python-install && \
apk del .build-deps && \
apk add pcre && \
addgroup unit -g 101 && \
adduser -D -H unit -u 100 -G unit && \
mkdir -p /var/lib/unit/ && \
rm -rf /root/.cache && \
rm -rf /var/cache/apk/*

EXPOSE 5000

ENTRYPOINT [ "/init" ]
2 changes: 1 addition & 1 deletion docker_files/hxl_run
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ fi
chmod 600 /var/lib/unit/conf.json
chown unit /var/log/proxy

exec unitd --no-daemon --control 127.0.0.1:8080 --log /var/log/proxy/proxy.log
exec unitd --user unit --group unit --statedir /var/lib/unit --no-daemon --control 127.0.0.1:8080 --log /var/log/proxy/proxy.log
2 changes: 1 addition & 1 deletion hxl_proxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""

__version__="2.2.2"
__version__="2.2.3"
"""Module version number
See https://www.python.org/dev/peps/pep-0396/
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
urllib3<1.27,>1.21.1 # avoid caching bug
requests_cache
ckanapi>=3.5
flask>=2.2.5<2.3 # 2.3 messes up pip dependencies
flask==3.0.3
#git+https://github.com/HXLStandard/libhxl-python.git@dev#egg=libhxl # for development
libhxl==5.2.1 # for release
flask-caching
Expand Down

0 comments on commit 9d677d7

Please sign in to comment.