Skip to content

Commit

Permalink
Merge pull request #142 from hzi-braunschweig/integration
Browse files Browse the repository at this point in the history
Release 2.13.1 (#141)
  • Loading branch information
nliakm authored Nov 23, 2020
2 parents 1bff031 + ef7effa commit 4ef9677
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SORMAS_POSTGRES_PASSWORD=password

SORMAS_POSTGRES_USER=sormas_user
SORMAS_DOCKER_VERSION=2.13.0
SORMAS_DOCKER_VERSION=2.13.1
SORMAS_VERSION=1.51.1
SORMAS_SERVER_URL=sormas-docker-test.com
SORMAS_URL=https://github.com/hzi-braunschweig/SORMAS-Project/releases/download/
Expand Down
1 change: 1 addition & 0 deletions docker-compose-external-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ services:
- EVENTARCHIVEDAYS=${EVENTARCHIVEDAYS}

volumes:
- ${SORMAS_PATH}/documents:/opt/sormas/documents
- ${SORMAS_PATH}/custom:/opt/sormas/custom
- ${SORMAS_PATH}/sormas-logs:/opt/domains/sormas/logs
depends_on:
Expand Down
1 change: 1 addition & 0 deletions docker-compose-keycloak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ services:
- CASEARCHIVEDAYS=${CASEARCHIVEDAYS}
- EVENTARCHIVEDAYS=${EVENTARCHIVEDAYS}
volumes:
- ${SORMAS_PATH}/documents:/opt/sormas/documents
- ${SORMAS_PATH}/custom:/opt/sormas/custom
- ${SORMAS_PATH}/sormas-logs:/opt/domains/sormas/logs
- ./apache2/certs:/tmp/certs
Expand Down
1 change: 1 addition & 0 deletions docker-compose-s2s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ services:
- CASEARCHIVEDAYS=${CASEARCHIVEDAYS}
- EVENTARCHIVEDAYS=${EVENTARCHIVEDAYS}
volumes:
- ${SORMAS_PATH}/documents:/opt/sormas/documents
- ${SORMAS_PATH}/custom:/opt/sormas/custom
- ${SORMAS_PATH}/sormas2sormas:/opt/sormas/sormas2sormas
- ${SORMAS_PATH}/sormas-logs:/opt/domains/sormas/logs
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ services:
- CASEARCHIVEDAYS=${CASEARCHIVEDAYS}
- EVENTARCHIVEDAYS=${EVENTARCHIVEDAYS}
volumes:
- ${SORMAS_PATH}/documents:/opt/sormas/documents
- ${SORMAS_PATH}/custom:/opt/sormas/custom
- ${SORMAS_PATH}/sormas2sormas:/opt/sormas/sormas2sormas
- ${SORMAS_PATH}/sormas-logs:/opt/domains/sormas/logs
Expand Down Expand Up @@ -96,9 +97,6 @@ services:
- PGPASSWORD=${SORMAS_POSTGRES_PASSWORD}
- SORMAS_POSTGRES_USER=${SORMAS_POSTGRES_USER}
- TZ=${TZ}
- MIN=15,45 # Twice the hour on 15 and 45 (use crontab notation)
- HOUR= # Keep empty for every hour. Use crontab notation otherwise
- KEEP=1 # keep db dumps for one day in backup folder
volumes:
- /backup:/var/opt/db_dumps
cpus: ${DB_DUMP_CPUS}
Expand Down
1 change: 1 addition & 0 deletions docker-compose_nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ services:
- EVENTARCHIVEDAYS=${EVENTARCHIVEDAYS}

volumes:
- ${SORMAS_PATH}/documents:/opt/sormas/documents
- ${SORMAS_PATH}/custom:/opt/sormas/custom
- ${SORMAS_PATH}/sormas2sormas:/opt/sormas/sormas2sormas
- ${SORMAS_PATH}/sormas-logs:/opt/domains/sormas/logs
Expand Down
6 changes: 4 additions & 2 deletions pg_dump/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ set -e
# MIN="17"
# HOUR="*/2"

MIN=${MIN:-15,45}
HOUR=${HOUR:-*}
RAND=$(( $RANDOM % 19 + 1 ))

MIN=${MIN:-${RAND},$(( ${RAND} + 30 ))}
HOUR=${HOUR:-0,4,7,8,9,10,11,12,13,14,15,16,17,18,20}

cat<<EOF | crontab -
# min hour day month weekday command
Expand Down
9 changes: 4 additions & 5 deletions pg_dump/pg_dump
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DATE=$( date +%F-%T )
DUMP_PATH=/var/opt/db_dumps
LOG=${DUMP_PATH}/pg_dump.log
KEEP=${KEEP:-1}
KEEP=${KEEP:-300}

DBS="${DB_NAME} ${DB_NAME_AUDIT}"

Expand All @@ -21,7 +21,6 @@ for d in ${DBS};do
done

echo "Deleting old dumps" >> ${LOG}
# keep 1 day => delete all files with mtime +0
find ${DUMP_PATH} -name \*.sql.gz -mtime +$(( ${KEEP} - 1 )) | xargs -r rm
find ${DUMP_PATH} -name \*.sql -mtime +$(( ${KEEP} - 1 )) | xargs -r rm
echo >> ${LOG};echo >> ${LOG}
# keep 1 day => delete all but the last 10 dumps
ls -rt ${DUMP_PATH}/sormas.20*.gz | head -n -10 | xargs -r rm
ls -rt ${DUMP_PATH}/sormas_audit.20*.gz | head -n -10 | xargs -r rm
2 changes: 2 additions & 0 deletions sormas/setup-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ USER_NAME=payara
PAYARA_HOME=${ROOT_PREFIX}/opt/payara5
DOMAINS_HOME=${ROOT_PREFIX}/opt/domains
TEMP_DIR=${ROOT_PREFIX}/opt/${DOMAIN_NAME}/temp
DOCUMENTS_DIR=${ROOT_PREFIX}/opt/${DOMAIN_NAME}/documents
GENERATED_DIR=${ROOT_PREFIX}/opt/${DOMAIN_NAME}/generated
CUSTOM_DIR=${ROOT_PREFIX}/opt/${DOMAIN_NAME}/custom

Expand All @@ -23,6 +24,7 @@ LOG_FILE_NAME=server_update_`date +"%Y-%m-%d_%H-%M-%S"`.log
mkdir -p ${PAYARA_HOME}
mkdir -p ${DOMAINS_HOME}
mkdir -p ${TEMP_DIR}
mkdir -p ${DOCUMENTS_DIR}
mkdir -p ${GENERATED_DIR}
mkdir -p ${CUSTOM_DIR}
mkdir -p ${DEPLOY_PATH}
Expand Down
1 change: 1 addition & 0 deletions sormas/start-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ USER_NAME=payara
PAYARA_HOME=${ROOT_PREFIX}/opt/payara5
DOMAINS_HOME=${ROOT_PREFIX}/opt/domains
TEMP_DIR=${ROOT_PREFIX}/opt/${DOMAIN_NAME}/temp
DOCUMENTS_DIR=${ROOT_PREFIX}/opt/${DOMAIN_NAME}/documents
GENERATED_DIR=${ROOT_PREFIX}/opt/${DOMAIN_NAME}/generated
CUSTOM_DIR=${ROOT_PREFIX}/opt/${DOMAIN_NAME}/custom

Expand Down

0 comments on commit 4ef9677

Please sign in to comment.