Tweak to run the healthchecks
This commit is contained in:
@@ -34,9 +34,6 @@ LABEL maintainer="flow.gunso@gmail.com" \
|
||||
# Copy over the assets.
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
COPY docker-healthcheck.sh /healthcheck.sh
|
||||
COPY seafile-entrypoint.sh /home/seafuser/entrypoint.sh
|
||||
COPY seafile-healthcheck.sh /home/seafuser/healthcheck.sh
|
||||
COPY seafile-healthcheck.py /home/seafuser/healthcheck.py
|
||||
COPY tests /tests
|
||||
|
||||
# Install seaf-cli and oathtool, prepare the user.
|
||||
@@ -64,10 +61,13 @@ RUN apt-get update && apt-get install -y gnupg && \
|
||||
groupadd -g $GID -o $UNAME && \
|
||||
useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME && \
|
||||
mkdir /home/$UNAME/.seafile && \
|
||||
chown $UNAME:$GID /home/$UNAME/.seafile && \
|
||||
chmod +x /home/$UNAME/healthcheck.py
|
||||
chown $UNAME:$GID /home/$UNAME/.seafile
|
||||
|
||||
COPY seafile-entrypoint.sh /home/seafuser/entrypoint.sh
|
||||
COPY seafile-healthcheck.py /home/seafuser/healthcheck.py
|
||||
RUN chmod +x /home/$UNAME/healthcheck.py && \
|
||||
chown $UNAME:$GID /home/$UNAME/
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "--"]
|
||||
CMD ["/entrypoint.sh"]
|
||||
#HEALTHCHECK --start-period=20s --retries=1 CMD ["su", "-", "${UNAME}", "-c", "~/healthcheck.sh"]
|
||||
HEALTHCHECK --start-period=20s --retries=1 CMD ["su", "-", "${UNAME}", "-c", "~/healthcheck.py -c ~/.seafile/seafile-data ${SEAF_LIBRARY_ID}]
|
||||
HEALTHCHECK --start-period=1m CMD /healthcheck.sh
|
||||
Reference in New Issue
Block a user