Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docker image, add indy-vdr to deps #69

Merged
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
57 changes: 56 additions & 1 deletion fetch-validator-status/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,59 @@
FROM bcgovimages/von-image:next-1
FROM python:3.10-slim-bullseye

ARG uid=1001
ARG user=indy
ARG tag_name=indy-node-monitor
ARG tag_version=

ENV HOME="/home/$user" \
APP_ROOT="$HOME" \
LC_ALL=C.UTF-8 \
LANG=C.UTF-8 \
PIP_NO_CACHE_DIR=off \
PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=UTF-8 \
RUST_LOG=warning \
SHELL=/bin/bash \
SUMMARY="Indy Node Monitor" \
DESCRIPTION="A container for monitoring the nodes of an Indy Node network."

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="$tag_name $tag_version" \
name="$tag_name" \
version="$tag_version" \
maintainer=""

# Add local binaries and aliases to path
ENV PATH="$HOME/.local/bin:$PATH"

# Make libraries resolvable by python
ENV LD_LIBRARY_PATH="$HOME/.local/lib:$LD_LIBRARY_PATH"
RUN echo "$HOME/.local/lib" > /etc/ld.so.conf.d/local.conf && ldconfig

# Add indy user
RUN useradd -U -ms /bin/bash -u $uid $user
WORKDIR $HOME

# - In order to drop the root user, we have to make some directories writable
# to the root group as OpenShift default security model is to run the container
# under random UID.
RUN usermod -a -G 0 indy

# Create standard directories to allow volume mounting and set permissions
# Note: PIP_NO_CACHE_DIR environment variable should be cleared to allow caching
RUN mkdir -p \
$HOME/log \
$(python -m site --user-site)

# The root group needs access the directories under $HOME for the container to function in OpenShift.
# Also ensure the permissions on the python 'site-packages' folder are set correctly.
RUN chown -R indy:root $HOME && \
chmod -R ug+rw $HOME && \
chmod +rx $(python -m site --user-site)

USER $user

ADD requirements.txt .
RUN pip3 install --upgrade pip
Expand Down
5 changes: 4 additions & 1 deletion fetch-validator-status/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ gspread
oauth2client
fastapi
uvicorn
gunicorn
gunicorn

base58
indy-vdr
2 changes: 1 addition & 1 deletion telegraf/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -507,4 +507,4 @@
## 1. Local -- interpret based on machine localtime
## 2. "America/New_York" -- Unix TZ values like those found in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
## 3. UTC -- or blank/unspecified, will return timestamp in UTC
json_timezone = ""
json_timezone = ""