cronjob config for syncing CRLs
This commit is contained in:
parent
9fe7d877ba
commit
e17edf1f39
@ -21,7 +21,7 @@ EXPOSE "${APP_PORT}"
|
|||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
# Default command is to launch the server
|
# Default command is to launch the server
|
||||||
CMD ["bash", "-c", "${APP_DIR}/script/uwsgi_server"]
|
CMD ["bash", "-c", "crond -b && ${APP_DIR}/script/uwsgi_server"]
|
||||||
|
|
||||||
### Items that will change almost every build
|
### Items that will change almost every build
|
||||||
#############################################
|
#############################################
|
||||||
@ -41,6 +41,9 @@ WORKDIR ${APP_DIR}
|
|||||||
RUN set -x ; \
|
RUN set -x ; \
|
||||||
script/alpine_setup "${APP_USER}" "${APP_GROUP}"
|
script/alpine_setup "${APP_USER}" "${APP_GROUP}"
|
||||||
|
|
||||||
|
# add sync-crl cronjob for atst user
|
||||||
|
RUN echo "1 */6 * * * /opt/atat/atst/script/sync-crls tests/crl-tmp" >> /etc/crontabs/atst
|
||||||
|
|
||||||
# Update file ownership
|
# Update file ownership
|
||||||
RUN set -x ; \
|
RUN set -x ; \
|
||||||
for subdir in $(find . -type d -maxdepth 1 | grep -Ee '.[^/]' | grep -Fve 'node_modules'); do chown atst:atat -R ${subdir}; done
|
for subdir in $(find . -type d -maxdepth 1 | grep -Ee '.[^/]' | grep -Fve 'node_modules'); do chown atst:atat -R ${subdir}; done
|
||||||
|
@ -4,11 +4,17 @@
|
|||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
mkdir -p crl-tmp
|
if [[ $# -eq 0 ]]; then
|
||||||
pipenv run python ./atst/domain/authnid/crl/util.py crl-tmp crl
|
TMP_DIR=crl-tmp
|
||||||
|
else
|
||||||
|
TMP_DIR=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p $TMP_DIR
|
||||||
|
pipenv run python ./atst/domain/authnid/crl/util.py $TMP_DIR crl
|
||||||
mkdir -p crl
|
mkdir -p crl
|
||||||
rsync -rq --min-size 400 crl-tmp/. crl/.
|
rsync -rq --min-size 400 $TMP_DIR/. crl/.
|
||||||
rm -rf crl-tmp
|
rm -rf $TMP_DIR
|
||||||
|
|
||||||
if [[ $FLASK_ENV != "prod" ]]; then
|
if [[ $FLASK_ENV != "prod" ]]; then
|
||||||
# place our test CRL there
|
# place our test CRL there
|
||||||
|
Loading…
x
Reference in New Issue
Block a user