From 64ced70c5082399a324ed7bbc0b80f77a2a85063 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Fri, 8 Jan 2021 14:29:29 -0800 Subject: [PATCH] add example deploy script --- deploy_photo_app.bash.example | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 deploy_photo_app.bash.example diff --git a/deploy_photo_app.bash.example b/deploy_photo_app.bash.example new file mode 100755 index 0000000..b268fae --- /dev/null +++ b/deploy_photo_app.bash.example @@ -0,0 +1,50 @@ +#!/bin/bash +# deploy_photo_app.bash + + +SOURCE="/home//flaskapps/photo_app" +DESTINATION="/var/lib/" + +cp -v "$SOURCE"/config.py "$DESTINATION"/ +cp -v "$SOURCE"/photo_app.py "$DESTINATION"/ + +cp -v "$SOURCE"/app/__init__.py "$DESTINATION"/app/ +cp -v "$SOURCE"/app/routes.py "$DESTINATION"/app/ +cp -v "$SOURCE"/app/sendxmpp_handler.py "$DESTINATION"/app/ +cp -v "$SOURCE"/app/models.py "$DESTINATION"/app/ +cp -v "$SOURCE"/app/forms.py "$DESTINATION"/app/ +cp -v "$SOURCE"/app/email.py "$DESTINATION"/app/ + +cp -v "$SOURCE"/app/templates/base.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/index.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/login.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/register.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/reset_password.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/reset_password_request.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/edit_profile.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/change_password.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/qr.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/disable_2fa.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/two_factor_input.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/upload.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/photo.html "$DESTINATION"/app/templates/ +cp -v "$SOURCE"/app/templates/delete_photo.html "$DESTINATION"/app/templates/ + +cp -v "$SOURCE"/app/templates/email/reset_password_email_html.html "$DESTINATION"/app/templates/email/ +cp -v "$SOURCE"/app/templates/email/reset_password_email_text.txt "$DESTINATION"/app/templates/email/ + +cp -v "$SOURCE"/app/scripts/set_contributor_id_seq.py "$DESTINATION"/app/scripts/ +cp -v "$SOURCE"/app/scripts/totp_utils.py "$DESTINATION"/app/scripts/ +cp -v "$SOURCE"/app/scripts/process_uploaded_photo.py "$DESTINATION"/app/scripts/ +cp -v "$SOURCE"/app/scripts/crop_photo.py "$DESTINATION"/app/scripts/ +cp -v "$SOURCE"/app/scripts/get_exif_data.py "$DESTINATION"/app/scripts/ +cp -v "$SOURCE"/app/scripts/get_photo_list.py "$DESTINATION"/app/scripts/ +cp -v "$SOURCE"/app/scripts/delete_photo.py "$DESTINATION"/app/scripts/ + +cp -v "$SOURCE"/css/photo_app.css "$DESTINATION"/css/ + +cp -v "$SOURCE"/js/photo_app.js "$DESTINATION"/js/ + +chown -R photo_app:photo_app "$DESTINATION" + +chmod 600 "$DESTINATION"/.env