From 847e889f1c0a9b4a5f8a92cb3ced40aa62879405 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 1 Apr 2024 08:29:23 -0700 Subject: [PATCH 1/7] update Django and postgres --- compose/production/postgres/Dockerfile | 2 +- requirements/base.txt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compose/production/postgres/Dockerfile b/compose/production/postgres/Dockerfile index 0c5d1758..724304a9 100644 --- a/compose/production/postgres/Dockerfile +++ b/compose/production/postgres/Dockerfile @@ -1,4 +1,4 @@ -FROM postgis/postgis:13-3.2 +FROM postgis/postgis:13-3.4 COPY ./compose/production/postgres/maintenance /usr/local/bin/maintenance RUN chmod +x /usr/local/bin/maintenance/* diff --git a/requirements/base.txt b/requirements/base.txt index 3600eaad..8281b9f2 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -9,7 +9,7 @@ hiredis==2.0.0 # https://github.com/redis/hiredis-py celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery django-celery-beat==2.4.0 # https://github.com/celery/django-celery-beat flower==1.2.0 # https://github.com/mher/flower -uvicorn[standard]==0.20.0 # https://github.com/encode/uvicorn +uvicorn[standard]==0.29.0 # https://github.com/encode/uvicorn psycopg2==2.9.5 # https://github.com/psycopg/psycopg2 unidecode==1.3.2 opencc==1.1.3 ## https://github.com/BYVoid/OpenCC @@ -27,24 +27,24 @@ django-private-storage==3.0 # https://github.com/edoburu/django-private-storage # django-reversion==4.0.1 # https://github.com/etianen/django-reversion dateparser==1.1.1 # https://github.com/scrapinghub/dateparser # sendgrid==6.9.3 # https://github.com/sendgrid/sendgrid-python -django-anymail[sendgrid]==8.6 # https://github.com/anymail/django-anymail +django-anymail[sendgrid]==10.3 # https://github.com/anymail/django-anymail django_partial_date==1.3.2 # https://github.com/ktowen/django_partial_date -django-pghistory==2.4.1 # https://github.com/Opus10/django-pghistory +django-pghistory==2.4.2 # https://github.com/Opus10/django-pghistory django-db-comments==0.4.1 # https://github.com/vanadium23/django-db-comments -weasyprint==55.0 # https://github.com/Kozea/WeasyPrint -django-weasyprint==2.1.0 # https://github.com/fdemmer/django-weasyprint +# weasyprint==55.0 # https://github.com/Kozea/WeasyPrint +# django-weasyprint==2.1.0 # https://github.com/fdemmer/django-weasyprint GitPython==3.1.31 # https://github.com/gitpython-developers/GitPython # Django # ------------------------------------------------------------------------------ -django==3.2.16 # pyup: < 4.0 # https://www.djangoproject.com/ +django==3.2.25 # pyup: < 4.0 # https://www.djangoproject.com/ django-environ==0.9.0 # https://github.com/joke2k/django-environ django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils -django-allauth==0.51.0 # https://github.com/pennersr/django-allauth +django-allauth==0.53.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 django-compressor==4.0 # https://github.com/django-compressor/django-compressor django-redis==5.2.0 # https://github.com/jazzband/django-redis # Django REST Framework -djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework +djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework # 3.15 will have ImproperlyConfigured exception requireing unique basename for viewset django-cors-headers==3.13.0 # https://github.com/adamchainz/django-cors-headers From bd98c746afb198a4f886734f8b57746ed8f19f77 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 1 Apr 2024 11:34:38 -0700 Subject: [PATCH 2/7] finally able to use opencc local --- local.yml | 5 +++++ requirements/base.txt | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/local.yml b/local.yml index 5c321109..a6cbad83 100644 --- a/local.yml +++ b/local.yml @@ -6,6 +6,7 @@ volumes: services: django: &django + platform: linux/amd64 build: context: . dockerfile: ./compose/local/django/Dockerfile @@ -26,6 +27,7 @@ services: command: /start postgres: + platform: linux/amd64 build: context: . dockerfile: ./compose/production/postgres/Dockerfile @@ -38,6 +40,7 @@ services: - ./.envs/.local/.postgres docs: + platform: linux/amd64 image: attendees_local_docs container_name: docs build: @@ -54,12 +57,14 @@ services: command: /start-docs mailhog: + platform: linux/amd64 image: mailhog/mailhog:v1.0.0 container_name: mailhog ports: - "8025:8025" redis: + platform: linux/amd64 image: redis:6 container_name: redis diff --git a/requirements/base.txt b/requirements/base.txt index 8281b9f2..cbd86015 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -3,8 +3,8 @@ python-slugify==7.0.0 # https://github.com/un33k/python-slugify Pillow==9.3.0 # https://github.com/python-pillow/Pillow rcssmin==1.1.0 # https://github.com/ndparker/rcssmin argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi -whitenoise==6.2.0 # https://github.com/evansd/whitenoise -redis==4.4.0 # https://github.com/redis/redis-py +whitenoise==6.4.0 # https://github.com/evansd/whitenoise +redis==4.4.4 # https://github.com/redis/redis-py hiredis==2.0.0 # https://github.com/redis/hiredis-py celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery django-celery-beat==2.4.0 # https://github.com/celery/django-celery-beat From 217f5ebb2eaf87ea07f38e30858fb85ed3a7c54a Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 1 Apr 2024 11:50:45 -0700 Subject: [PATCH 3/7] update more version --- README.md | 3 ++- requirements/base.txt | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 99cb8148..67ec94db 100644 --- a/README.md +++ b/README.md @@ -379,7 +379,8 @@ DJANGO_DEFAULT_FROM_EMAIL=<> EMAIL_HOST=sendgrid ``` * Install and start [docker desktop](https://www.docker.com/products/docker-desktop) (including docker compose), and [add local repo directory to file sharing in docker desktop preference](https://docs.docker.com/desktop/settings/mac/#file-sharing). -* build and start the CentOS based local machine by `docker-compose -f local.yml build && docker-compose -f local.yml up -d`, your site will be at http://0.0.0.0:8008/ +* In Docker Desktop Settings, please ensure both "Use Virtualization framework" and "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" options in enabled. +* build and start the Debian based local machine by `docker-compose -f local.yml build && docker-compose -f local.yml up -d`, your site will be at http://0.0.0.0:8008/ * to see django log: `docker-compose -f local.yml logs django` * enter Redis-CLI by `docker exec -it redis redis-cli` diff --git a/requirements/base.txt b/requirements/base.txt index cbd86015..9fcfeec0 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -38,8 +38,8 @@ GitPython==3.1.31 # https://github.com/gitpython-developers/GitPython # Django # ------------------------------------------------------------------------------ django==3.2.25 # pyup: < 4.0 # https://www.djangoproject.com/ -django-environ==0.9.0 # https://github.com/joke2k/django-environ -django-model-utils==4.3.1 # https://github.com/jazzband/django-model-utils +django-environ==0.10.0 # https://github.com/joke2k/django-environ +django-model-utils==4.4.0 # https://github.com/jazzband/django-model-utils django-allauth==0.53.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 @@ -47,4 +47,4 @@ django-compressor==4.0 # https://github.com/django-compressor/django-compressor django-redis==5.2.0 # https://github.com/jazzband/django-redis # Django REST Framework djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework # 3.15 will have ImproperlyConfigured exception requireing unique basename for viewset -django-cors-headers==3.13.0 # https://github.com/adamchainz/django-cors-headers +django-cors-headers==3.14.0 # https://github.com/adamchainz/django-cors-headers From 53af93dc7495e8543ef5aec30f2c58c29c23b2df Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 3 Apr 2024 14:54:23 -0700 Subject: [PATCH 4/7] update environ and model utils --- requirements/base.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 9fcfeec0..c8361eaa 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -21,7 +21,7 @@ opencc==1.1.3 ## https://github.com/BYVoid/OpenCC # django-summernote==0.8.20.0 # https://github.com/summernote/django-summernote # -e git+https://github.com/llazzaro/django-scheduler.git@develop#egg=django-scheduler django-scheduler==0.10.0 # https://github.com/llazzaro/django-scheduler -django-mptt==0.13.4 # https://github.com/django-mptt/django-mptt +django-mptt==0.14.0 # https://github.com/django-mptt/django-mptt django-json-widget==1.1.1 # https://github.com/jmrivas86/django-json-widget django-private-storage==3.0 # https://github.com/edoburu/django-private-storage # django-reversion==4.0.1 # https://github.com/etianen/django-reversion @@ -38,13 +38,13 @@ GitPython==3.1.31 # https://github.com/gitpython-developers/GitPython # Django # ------------------------------------------------------------------------------ django==3.2.25 # pyup: < 4.0 # https://www.djangoproject.com/ -django-environ==0.10.0 # https://github.com/joke2k/django-environ -django-model-utils==4.4.0 # https://github.com/jazzband/django-model-utils +django-environ==0.11.1 # https://github.com/joke2k/django-environ +django-model-utils==4.5.0 # https://github.com/jazzband/django-model-utils django-allauth==0.53.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 django-compressor==4.0 # https://github.com/django-compressor/django-compressor -django-redis==5.2.0 # https://github.com/jazzband/django-redis +django-redis==5.3.0 # https://github.com/jazzband/django-redis # Django REST Framework djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework # 3.15 will have ImproperlyConfigured exception requireing unique basename for viewset django-cors-headers==3.14.0 # https://github.com/adamchainz/django-cors-headers From 4f13d81303d9a8c59afe14894626f340569aa970 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 19 Apr 2024 21:45:46 -0700 Subject: [PATCH 5/7] update celery --- requirements/base.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index c8361eaa..2d43bbe7 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -5,10 +5,10 @@ rcssmin==1.1.0 # https://github.com/ndparker/rcssmin argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi whitenoise==6.4.0 # https://github.com/evansd/whitenoise redis==4.4.4 # https://github.com/redis/redis-py -hiredis==2.0.0 # https://github.com/redis/hiredis-py -celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery -django-celery-beat==2.4.0 # https://github.com/celery/django-celery-beat -flower==1.2.0 # https://github.com/mher/flower +hiredis==2.1.1 # https://github.com/redis/hiredis-py +celery==5.3.1 # pyup: < 6.0 # https://github.com/celery/celery +django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat +flower==2.0.1 # https://github.com/mher/flower uvicorn[standard]==0.29.0 # https://github.com/encode/uvicorn psycopg2==2.9.5 # https://github.com/psycopg/psycopg2 unidecode==1.3.2 From 3733bfc76e8f5da2101986d865bd47c47e1ebeea Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 20 Apr 2024 11:18:25 -0700 Subject: [PATCH 6/7] test --- requirements/base.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 2d43bbe7..bb2e6945 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -10,7 +10,7 @@ celery==5.3.1 # pyup: < 6.0 # https://github.com/celery/celery django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat flower==2.0.1 # https://github.com/mher/flower uvicorn[standard]==0.29.0 # https://github.com/encode/uvicorn -psycopg2==2.9.5 # https://github.com/psycopg/psycopg2 +psycopg2==2.9.9 # https://github.com/psycopg/psycopg2 unidecode==1.3.2 opencc==1.1.3 ## https://github.com/BYVoid/OpenCC # opencc-python-reimplemented==0.1.6 ## https://github.com/yichen0831/opencc-python @@ -20,12 +20,12 @@ opencc==1.1.3 ## https://github.com/BYVoid/OpenCC # django-summernote==0.8.20.0 # https://github.com/summernote/django-summernote # -e git+https://github.com/llazzaro/django-scheduler.git@develop#egg=django-scheduler -django-scheduler==0.10.0 # https://github.com/llazzaro/django-scheduler +django-scheduler==0.10.1 # https://github.com/llazzaro/django-scheduler django-mptt==0.14.0 # https://github.com/django-mptt/django-mptt -django-json-widget==1.1.1 # https://github.com/jmrivas86/django-json-widget -django-private-storage==3.0 # https://github.com/edoburu/django-private-storage +django-json-widget==2.0.1 # https://github.com/jmrivas86/django-json-widget +django-private-storage==3.1.1 # https://github.com/edoburu/django-private-storage # django-reversion==4.0.1 # https://github.com/etianen/django-reversion -dateparser==1.1.1 # https://github.com/scrapinghub/dateparser +dateparser==1.1.8 # https://github.com/scrapinghub/dateparser # sendgrid==6.9.3 # https://github.com/sendgrid/sendgrid-python django-anymail[sendgrid]==10.3 # https://github.com/anymail/django-anymail django_partial_date==1.3.2 # https://github.com/ktowen/django_partial_date @@ -33,7 +33,7 @@ django-pghistory==2.4.2 # https://github.com/Opus10/django-pghistory django-db-comments==0.4.1 # https://github.com/vanadium23/django-db-comments # weasyprint==55.0 # https://github.com/Kozea/WeasyPrint # django-weasyprint==2.1.0 # https://github.com/fdemmer/django-weasyprint -GitPython==3.1.31 # https://github.com/gitpython-developers/GitPython +GitPython==3.1.43 # https://github.com/gitpython-developers/GitPython # Django # ------------------------------------------------------------------------------ @@ -46,5 +46,5 @@ crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstra django-compressor==4.0 # https://github.com/django-compressor/django-compressor django-redis==5.3.0 # https://github.com/jazzband/django-redis # Django REST Framework -djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework # 3.15 will have ImproperlyConfigured exception requireing unique basename for viewset +djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework # 3.15 will have ImproperlyConfigured exception requiring unique basename for viewset django-cors-headers==3.14.0 # https://github.com/adamchainz/django-cors-headers From 21eb8c0f2f3bad1cd5a824e5a4a58eec635535ba Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 22 Apr 2024 06:34:16 -0700 Subject: [PATCH 7/7] revert django-celery-beat upgrade for skipping migration --- fixtures/db_seed.json | 4 ++-- requirements/base.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fixtures/db_seed.json b/fixtures/db_seed.json index 2d954e44..4be6e867 100644 --- a/fixtures/db_seed.json +++ b/fixtures/db_seed.json @@ -1858,7 +1858,7 @@ "expire_seconds": null, "one_off": false, "start_time": "2020-08-27T22:37:02Z", - "enabled": true, + "enabled": false, "last_run_at": null, "total_run_count": 0, "date_changed": "2021-08-28T18:59:47.395Z", @@ -1886,7 +1886,7 @@ "expire_seconds": null, "one_off": false, "start_time": "2020-08-27T22:37:02Z", - "enabled": true, + "enabled": false, "last_run_at": null, "total_run_count": 0, "date_changed": "2021-08-28T18:59:47.395Z", diff --git a/requirements/base.txt b/requirements/base.txt index bb2e6945..e5ca0475 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -7,7 +7,7 @@ whitenoise==6.4.0 # https://github.com/evansd/whitenoise redis==4.4.4 # https://github.com/redis/redis-py hiredis==2.1.1 # https://github.com/redis/hiredis-py celery==5.3.1 # pyup: < 6.0 # https://github.com/celery/celery -django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat +django-celery-beat==2.4.0 # https://github.com/celery/django-celery-beat # 2.5.0 will need new crontabschedule migration flower==2.0.1 # https://github.com/mher/flower uvicorn[standard]==0.29.0 # https://github.com/encode/uvicorn psycopg2==2.9.9 # https://github.com/psycopg/psycopg2