diff options
author | Matthew Lemon <y@yulqen.org> | 2024-12-31 16:01:12 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-12-31 16:01:12 +0000 |
commit | c74ea9e6b4af97be26029334868fa3264032c2d3 (patch) | |
tree | 6d0dcc825f9c4d70f543eeb1817d664e5e358320 /compose/production/aws/maintenance | |
parent | b00665b30423e4818afafdec305202797638e145 (diff) |
Major refactoring and removal of junk
This commit includes significant refactoring, cleanup, and updates across various components of the Django project. The following changes were made:
- **Database Migration Updates:**
- Removed unnecessary migrations in the `alphabetlearning.contrib.sites` and `alphabetlearning.payments` apps, consolidating them into cleaner initial migration files.
- Altered the `Site` model in `alphabetlearning.contrib.sites` to streamline its fields and default settings.
- Introduced new models in `alphabetlearning.payments` related to email signups and verification, reflecting a shift in focus and better alignment with current business logic.
- **Django Settings Changes:**
- Updated the database settings to use SQLite for local development, while commenting out production-specific configurations.
- Managed third-party dependencies within `requirements.txt` and `pyproject.toml`, ensuring alignment with the latest Django version (5.1.4) and removing obsolete dependencies (e.g., `celery`, `django-celery-beat`, `flower`, etc.).
- **Docker and Compose Clean-up:**
- Removed old Dockerfiles and unnecessary services from the `docker-compose` configuration, streamlining the local and production setups.
- Updated the Dockerfile configuration for local development, focusing on essential services only.
- **General Code Clean-up:**
- Removed unused tasks, views, tests, and files related to the Celery and Redis frameworks.
- Cleaned up various model definitions and their related migrations for consistency and clarity.
- **Documentation and Comments:**
- Updated comments and code documentation where necessary to reflect the changes made during this cleanup process.
This major refactor aims to enhance project maintainability and streamline the development experience while preparing for future feature expansions and improvements.
Diffstat (limited to 'compose/production/aws/maintenance')
-rw-r--r-- | compose/production/aws/maintenance/download | 23 | ||||
-rw-r--r-- | compose/production/aws/maintenance/upload | 29 |
2 files changed, 0 insertions, 52 deletions
diff --git a/compose/production/aws/maintenance/download b/compose/production/aws/maintenance/download deleted file mode 100644 index 9561d91..0000000 --- a/compose/production/aws/maintenance/download +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -### Download a file from your Amazon S3 bucket to the postgres /backups folder -### -### Usage: -### $ docker compose -f production.yml run --rm awscli <1> - -set -o errexit -set -o pipefail -set -o nounset - -working_dir="$(dirname ${0})" -source "${working_dir}/_sourced/constants.sh" -source "${working_dir}/_sourced/messages.sh" - -export AWS_ACCESS_KEY_ID="${DJANGO_AWS_ACCESS_KEY_ID}" -export AWS_SECRET_ACCESS_KEY="${DJANGO_AWS_SECRET_ACCESS_KEY}" -export AWS_STORAGE_BUCKET_NAME="${DJANGO_AWS_STORAGE_BUCKET_NAME}" - - -aws s3 cp s3://${AWS_STORAGE_BUCKET_NAME}${BACKUP_DIR_PATH}/${1} ${BACKUP_DIR_PATH}/${1} - -message_success "Finished downloading ${1}." diff --git a/compose/production/aws/maintenance/upload b/compose/production/aws/maintenance/upload deleted file mode 100644 index 73c1b9b..0000000 --- a/compose/production/aws/maintenance/upload +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -### Upload the /backups folder to Amazon S3 -### -### Usage: -### $ docker compose -f production.yml run --rm awscli upload - -set -o errexit -set -o pipefail -set -o nounset - -working_dir="$(dirname ${0})" -source "${working_dir}/_sourced/constants.sh" -source "${working_dir}/_sourced/messages.sh" - -export AWS_ACCESS_KEY_ID="${DJANGO_AWS_ACCESS_KEY_ID}" -export AWS_SECRET_ACCESS_KEY="${DJANGO_AWS_SECRET_ACCESS_KEY}" -export AWS_STORAGE_BUCKET_NAME="${DJANGO_AWS_STORAGE_BUCKET_NAME}" - - -message_info "Upload the backups directory to S3 bucket {$AWS_STORAGE_BUCKET_NAME}" - -aws s3 cp ${BACKUP_DIR_PATH} s3://${AWS_STORAGE_BUCKET_NAME}${BACKUP_DIR_PATH} --recursive - -message_info "Cleaning the directory ${BACKUP_DIR_PATH}" - -rm -rf ${BACKUP_DIR_PATH}/* - -message_success "Finished uploading and cleaning." |