Skip to content

Commit

Permalink
Merge pull request #218 from EHDEN/dev
Browse files Browse the repository at this point in the history
Update master to release 1.2.1
  • Loading branch information
joaorafaelalmeida authored Jan 7, 2022
2 parents 643334c + ed88b73 commit 0465a11
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions backups/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ print(settings.MEDIA_ROOT, end=\"\")
docker cp -a $DASHBOARDS_CONTAINER_ID:$MEDIA_ROOT $TMP_BACKUP_DIRECTORY

echo_step "6" "Compress gathered data"
COMPRESSED_FILE_PATH=$TMP_DIRECTORY/${APP_NAME}_$(date +"%Y%m%d%H%M%S").tar.xz
COMPRESSED_FILE_PATH=$TMP_DIRECTORY/${APP_NAME}_$(date +"%Y%m%d%H%M%S").zip
(
cd $TMP_DIRECTORY
zip -q -r $COMPRESSED_FILE_PATH $BACKUP_DIRECTORY_NAME
#tar -C $TMP_DIRECTORY -cJf $COMPRESSED_FILE_PATH $BACKUP_DIRECTORY_NAME

echo_step "7" "Send to $SERVER"
#backup_uploader $APP_NAME $SERVER $CREDENTIALS_FILE_PATH $BACKUP_CHAIN_CONFIG $COMPRESSED_FILE_PATH
backup_uploader $APP_NAME $SERVER $CREDENTIALS_FILE_PATH $BACKUP_CHAIN_CONFIG $COMPRESSED_FILE_PATH
) || EXIT_STATUS=$?
#rm -f $COMPRESSED_FILE_PATH
rm -f $COMPRESSED_FILE_PATH

exit $EXIT_STATUS
) || EXIT_STATUS=$?
Expand Down
4 changes: 4 additions & 0 deletions dashboard_viewer/uploader/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from django.http import JsonResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.utils.html import format_html, mark_safe
from django.views.decorators.clickjacking import xframe_options_exempt
from rest_framework.response import Response
from rest_framework.viewsets import GenericViewSet

Expand All @@ -19,6 +20,7 @@


@uploader_decorator
@xframe_options_exempt
def upload_achilles_results(request, *args, **kwargs):
data_source = kwargs.get("data_source")
try:
Expand Down Expand Up @@ -153,6 +155,7 @@ def _leave_valid_fields_values_only(request, initial, aux_form):


@uploader_decorator
@xframe_options_exempt
def create_data_source(request, *_, **kwargs):
data_source = kwargs.get("data_source")
if request.method == "GET":
Expand Down Expand Up @@ -234,6 +237,7 @@ def create_data_source(request, *_, **kwargs):


@uploader_decorator
@xframe_options_exempt
def edit_data_source(request, *_, **kwargs):
data_source = kwargs.get("data_source")
try:
Expand Down
2 changes: 2 additions & 0 deletions docker/.env-example
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ POSTGRES_ACHILLES_USER=achilles
POSTGRES_ACHILLES_PASSWORD=achilles
POSTGRES_ACHILLES_DB=achilles

VOLUMES_PATH=./volumes

#production or development
INSTALLATION_ENV=production

Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ services:
image: redis:3.2
restart: unless-stopped
volumes:
- ./volumes/redis:/data
- ${VOLUMES_PATH}/redis:/data

postgres:
image: postgres:10
Expand All @@ -102,7 +102,7 @@ services:
POSTGRES_DBS_USERS: ${POSTGRES_SUPERSET_USER} ${POSTGRES_DASHBOARD_VIEWER_USER} ${POSTGRES_ACHILLES_USER}
POSTGRES_DBS_PASSWORDS: ${POSTGRES_SUPERSET_PASSWORD} ${POSTGRES_DASHBOARD_VIEWER_PASSWORD} ${POSTGRES_ACHILLES_PASSWORD}
volumes:
- ./volumes/postgres:/var/lib/postgresql/data
- ${VOLUMES_PATH}/postgres:/var/lib/postgresql/data
- ./postgres-entrypoint:/docker-entrypoint-initdb.d

#### DASHBOARD ####
Expand Down

0 comments on commit 0465a11

Please sign in to comment.