Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python 3.13
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pycodestyle==2.5.0
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install --ignore-installed --break-system-packages pycodestyle==2.14.0
if [ -f requirements.txt ]; then pip install --ignore-installed --break-system-packages -r requirements.txt; fi
- name: Lint with pycodestyle
run: |
pycodestyle --max-line-length=100 *.py test/*.py
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye@sha256:3066ef83131c678999ce82e8473e8d017345a30f5573ad3e44f62e5c9c46442b
FROM debian:trixie@sha256:4ae67669760b807c19f23902a3fd7c121a6a70cf2ae709035674b23e712e4d62

RUN apt update -qq && apt upgrade --no-install-recommends -yqq \
&& apt install --no-install-recommends -yqq procps python3-pip uwsgi uwsgi-plugin-python3 python3-setuptools nginx runit \
Expand All @@ -11,6 +11,5 @@ COPY wsgi.runit /etc/service/wsgi/run

WORKDIR /pinserver
COPY runit_boot.sh wsgi.ini requirements.txt wsgi.py server.py lib.py pindb.py __init__.py generateserverkey.py flaskserver.py /pinserver/
RUN pip3 install --upgrade pip wheel
RUN pip3 install --require-hashes -r /pinserver/requirements.txt
RUN pip install --ignore-installed --break-system-packages --require-hashes -r /pinserver/requirements.txt
CMD ["/bin/bash", "-c", "chown www-data:www-data /pins; ./runit_boot.sh"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Green.

## Build the docker image

docker build -f Dockerfile . -t dockerized_pinserver
`docker build -f Dockerfile . -t dockerized_pinserver`

## Prepare the directory for all the pins

Expand Down
4 changes: 3 additions & 1 deletion pindb.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
redis_port = int(os.environ.get('REDIS_PORT', 6379))
redis_health_check_interval = int(os.environ.get('REDIS_HEALTH_CHECK_INTERVAL', 25))
redis_password = os.environ.get('REDIS_PASSWORD', None)
# Retry connections for up to 1 minute
redis_retry = redis.retry.Retry(redis.backoff.ConstantBackoff(1.0), retries=60)
red_conn = redis.Redis(host=redis_host, port=redis_port, db=0, password=redis_password,
health_check_interval=redis_health_check_interval,
retry_on_timeout=True)
retry=redis_retry)


class FileStorage(object):
Expand Down
Loading
Loading