2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-08 14:21:05 +00:00

Merge pull request #234 from revant/fix-push-site-config

fix: push site_config.json with backup
This commit is contained in:
Revant Nandgaonkar 2020-05-09 00:51:39 +05:30 committed by GitHub
commit ddb27f589a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,6 +176,10 @@ def main():
folder = os.environ.get('BUCKET_DIR') + '/' + site + '/' + os.path.basename(db_file)[:15] + '/'
upload_file_to_s3(db_file, folder, conn, bucket)
# Archive site_config.json
site_config_file = os.path.join(os.getcwd(), site, 'site_config.json')
upload_file_to_s3(site_config_file, folder, conn, bucket)
public_files = details.get('public_files', {}).get('file_path')
if public_files:
folder = os.environ.get('BUCKET_DIR') + '/' + site + '/' + os.path.basename(public_files)[:15] + '/'