From 2d01330f0e8b30a44f49d20c60fd80cbc510c1ac Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Mon, 17 Apr 2023 14:48:04 +0200 Subject: [PATCH 01/20] update allowed hosts --- config/settings/production.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/settings/production.py b/config/settings/production.py index a08d1d52..b34787fa 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -8,7 +8,7 @@ ALLOWED_HOSTS = [ "relayer-service", env("HOST_RELAYER", default="localhost"), - env("DJANGO_ALLOWED_HOSTS", default="circles.garden"), + env("DJANGO_ALLOWED_HOSTS", default=".circles.garden"), ] # DATABASES From ecc2358324206fca06dfa4deb4d7626154ed8cd1 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Mon, 17 Apr 2023 15:18:59 +0200 Subject: [PATCH 02/20] update ubuntu to use latest --- .github/workflows/tagbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tagbuild.yml b/.github/workflows/tagbuild.yml index 735f9816..36a6a236 100644 --- a/.github/workflows/tagbuild.yml +++ b/.github/workflows/tagbuild.yml @@ -9,7 +9,7 @@ on: jobs: build-and-push: name: build-and-push - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Install dependencies run: | From 7db5ef7f3a089d1e8fb8fa5e08a8bbe91b90363a Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Mon, 17 Apr 2023 15:20:40 +0200 Subject: [PATCH 03/20] force build --- config/settings/production.py | 1 + 1 file changed, 1 insertion(+) diff --git a/config/settings/production.py b/config/settings/production.py index b34787fa..5143a975 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -11,6 +11,7 @@ env("DJANGO_ALLOWED_HOSTS", default=".circles.garden"), ] + # DATABASES DATABASES["default"]["ATOMIC_REQUESTS"] = False From 689e23b6bc157db0b2ceecc42f89cd1853c96779 Mon Sep 17 00:00:00 2001 From: JacqueGM <55389166+JacqueGM@users.noreply.github.com> Date: Mon, 17 Apr 2023 15:29:50 +0200 Subject: [PATCH 04/20] update ubuntu version --- .github/workflows/tagbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tagbuild.yml b/.github/workflows/tagbuild.yml index 36a6a236..eba8d06d 100644 --- a/.github/workflows/tagbuild.yml +++ b/.github/workflows/tagbuild.yml @@ -9,7 +9,7 @@ on: jobs: build-and-push: name: build-and-push - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Install dependencies run: | From a37397ae315067da4a0e1829517834b76a76aa35 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Mon, 17 Apr 2023 15:43:32 +0200 Subject: [PATCH 05/20] update requirements.txt --- requirements.txt | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/requirements.txt b/requirements.txt index 631f5c37..a261c082 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,30 +1,31 @@ -cachetools==5.2.0 +cachetools==5.3.0 celery==5.2.7 -django==3.2.16 +django==4.1.7 django-authtools==2.0.0 -django-celery-beat==2.3.0 -django-cors-headers==3.13.0 +django-celery-beat==2.4.0 +django-cors-headers==3.14.0 django-debug-toolbar django-debug-toolbar-force -django-environ==0.9.0 +django-environ==0.10.0 django-filter==22.1 -django-model-utils==4.2.0 +django-model-utils==4.3.1 django-redis==5.2.0 django-timezone-field==5.0 -djangorestframework-camel-case==1.3.0 +djangorestframework-camel-case==1.4.2 djangorestframework==3.14.0 docutils==0.19 -drf-yasg[validation]==1.21.4 +drf-yasg[validation]==1.21.5 gunicorn[gevent]==20.1.0 +hiredis==2.2.2 hexbytes==0.2.2 -lxml==4.9.1 -numpy==1.23.3 -packaging==21.3 +lxml==4.9.2 +numpy==1.24.2 +packaging==23.0 psycogreen==1.0.2 psycopg2-binary==2.9.1 -psycopg2==2.9.4 -redis==4.3.4 +psycopg2==2.9.5 +redis==4.5.4 requests==2.28.1 sgqlc==11.0 -safe-eth-py[django]==4.8.1 -web3==5.31.1 \ No newline at end of file +safe-eth-py[django]==5.0.2 +web3==5.31.3 \ No newline at end of file From b2e79efc2d5ff8ab24b6a82944ad456941b96b0c Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Mon, 17 Apr 2023 15:56:36 +0200 Subject: [PATCH 06/20] update requirements --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a261c082..9d5fd827 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,4 +28,4 @@ redis==4.5.4 requests==2.28.1 sgqlc==11.0 safe-eth-py[django]==5.0.2 -web3==5.31.3 \ No newline at end of file +web3==5.31.3 From 1f0ef4c69e632f8979bc6851f66cfbb408a2aa77 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Mon, 17 Apr 2023 16:00:43 +0200 Subject: [PATCH 07/20] fix warning set-output deprecated --- .github/workflows/tagbuild.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/tagbuild.yml b/.github/workflows/tagbuild.yml index eba8d06d..8585ee4c 100644 --- a/.github/workflows/tagbuild.yml +++ b/.github/workflows/tagbuild.yml @@ -30,9 +30,7 @@ jobs: uses: actions/checkout@v2 - name: Get ref - id: parse_ref - run: | - echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} + run: echo ${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT - name: Digital Ocean Registry login run: | From 33061d0735ded45b3f64dae17202b88915611721 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Tue, 18 Apr 2023 14:29:11 +0200 Subject: [PATCH 08/20] update gitactions --- .github/workflows/tagbuild.yml | 6 +++--- Dockerfile | 6 +++--- requirements.txt | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tagbuild.yml b/.github/workflows/tagbuild.yml index 8585ee4c..285742f7 100644 --- a/.github/workflows/tagbuild.yml +++ b/.github/workflows/tagbuild.yml @@ -9,7 +9,7 @@ on: jobs: build-and-push: name: build-and-push - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Install dependencies run: | @@ -27,7 +27,7 @@ jobs: password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Get ref run: echo ${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT @@ -37,7 +37,7 @@ jobs: doctl registry login - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true diff --git a/Dockerfile b/Dockerfile index f215f2b6..bf631e58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-slim +FROM python:3.10 ENV PYTHONUNBUFFERED 1 ENV TINI_VERSION v0.19.0 @@ -32,8 +32,8 @@ RUN set -ex \ pkg-config \ " \ && apt-get install -y --no-install-recommends $buildDeps tmux \ - && pip install -U --no-cache-dir wheel setuptools pip \ - && pip install --no-cache-dir -r requirements.txt \ + && pip3 install -U --no-cache-dir wheel setuptools pip \ + && pip3 install --no-cache-dir -r requirements.txt \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /var/lib/apt/lists/* \ && find /usr/local \ diff --git a/requirements.txt b/requirements.txt index 9d5fd827..3480ab95 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,6 @@ lxml==4.9.2 numpy==1.24.2 packaging==23.0 psycogreen==1.0.2 -psycopg2-binary==2.9.1 psycopg2==2.9.5 redis==4.5.4 requests==2.28.1 From 33a287b926615bc9a19572b5f7c5bb9c782ac8ec Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Tue, 18 Apr 2023 14:46:47 +0200 Subject: [PATCH 09/20] change set-output back again --- .github/workflows/tagbuild.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tagbuild.yml b/.github/workflows/tagbuild.yml index 285742f7..6608a8a7 100644 --- a/.github/workflows/tagbuild.yml +++ b/.github/workflows/tagbuild.yml @@ -30,7 +30,8 @@ jobs: uses: actions/checkout@v3 - name: Get ref - run: echo ${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT + run: | + echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} - name: Digital Ocean Registry login run: | From 54437f976416260f40328335b84a2b66c30dbf03 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Tue, 18 Apr 2023 14:49:21 +0200 Subject: [PATCH 10/20] update dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf631e58..7176a47a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,8 +32,8 @@ RUN set -ex \ pkg-config \ " \ && apt-get install -y --no-install-recommends $buildDeps tmux \ - && pip3 install -U --no-cache-dir wheel setuptools pip \ - && pip3 install --no-cache-dir -r requirements.txt \ + && pip install -U --no-cache-dir wheel setuptools pip \ + && pip install --no-cache-dir -r requirements.txt \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /var/lib/apt/lists/* \ && find /usr/local \ From c41fceac96e8e0217477d0a71432d29b5f71cf5c Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Tue, 18 Apr 2023 17:28:24 +0200 Subject: [PATCH 11/20] update actions --- .github/workflows/tagbuild.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tagbuild.yml b/.github/workflows/tagbuild.yml index 6608a8a7..ddc9858b 100644 --- a/.github/workflows/tagbuild.yml +++ b/.github/workflows/tagbuild.yml @@ -21,17 +21,16 @@ jobs: doctl auth init -t ${{ secrets.CIRCLES_CI_DO_TOKEN }} - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Checkout uses: actions/checkout@v3 - name: Get ref - run: | - echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} + run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}">> $GITHUB_ENV - name: Digital Ocean Registry login run: | @@ -43,6 +42,6 @@ jobs: context: . push: true tags: | - registry.digitalocean.com/circles-registry/safe-relay-service:${{ steps.parse_ref.outputs.tag }} + registry.digitalocean.com/circles-registry/safe-relay-service:${{ env.RELEASE_VERSION }} joincircles/safe-relay-service:latest - joincircles/safe-relay-service:${{ steps.parse_ref.outputs.tag }} + joincircles/safe-relay-service:${{ env.RELEASE_VERSION }} From 5f2a1f9c3f0d6540eeef67f08137d9b7e591a461 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Tue, 18 Apr 2023 17:28:59 +0200 Subject: [PATCH 12/20] update dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7176a47a..aa868a43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10 +FROM python:3.10-slim ENV PYTHONUNBUFFERED 1 ENV TINI_VERSION v0.19.0 From b1f229a595aa4f40c7c9e841955f49f9db70a9f6 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Wed, 19 Apr 2023 15:06:28 +0200 Subject: [PATCH 13/20] update dockerfile and requirements --- requirements.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3480ab95..91523b01 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ celery==5.2.7 django==4.1.7 django-authtools==2.0.0 django-celery-beat==2.4.0 -django-cors-headers==3.14.0 +django-cors-headers==3.13.0 django-debug-toolbar django-debug-toolbar-force django-environ==0.10.0 @@ -16,15 +16,17 @@ djangorestframework==3.14.0 docutils==0.19 drf-yasg[validation]==1.21.5 gunicorn[gevent]==20.1.0 -hiredis==2.2.2 hexbytes==0.2.2 +hiredis==2.2.2 lxml==4.9.2 numpy==1.24.2 -packaging==23.0 +packaging==21.3 psycogreen==1.0.2 +# psycopg2-binary==2.9.1 psycopg2==2.9.5 redis==4.5.4 requests==2.28.1 sgqlc==11.0 -safe-eth-py[django]==5.0.2 +rlp<3, >=2 +safe-eth-py[django]==4.8.2 web3==5.31.3 From daaaddb89d6772320618097e7eb631ded7f90351 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Wed, 19 Apr 2023 15:08:29 +0200 Subject: [PATCH 14/20] update dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aa868a43..35966782 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-slim +FROM python:3.9-slim ENV PYTHONUNBUFFERED 1 ENV TINI_VERSION v0.19.0 @@ -31,6 +31,7 @@ RUN set -ex \ libgmp-dev \ pkg-config \ " \ + && apt-get update \ && apt-get install -y --no-install-recommends $buildDeps tmux \ && pip install -U --no-cache-dir wheel setuptools pip \ && pip install --no-cache-dir -r requirements.txt \ From 599f177774a6fce9e0954ce20d06d8c71ff561b7 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Wed, 19 Apr 2023 17:04:01 +0200 Subject: [PATCH 15/20] update rlp --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 91523b01..38112320 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,6 +27,6 @@ psycopg2==2.9.5 redis==4.5.4 requests==2.28.1 sgqlc==11.0 -rlp<3, >=2 +rlp==2.0.1 safe-eth-py[django]==4.8.2 web3==5.31.3 From 89fc745bb454cb1c27e66effc33c483f72cce1e7 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Wed, 19 Apr 2023 17:41:32 +0200 Subject: [PATCH 16/20] resolve conflicts --- requirements.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 38112320..f6d239e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,6 +27,5 @@ psycopg2==2.9.5 redis==4.5.4 requests==2.28.1 sgqlc==11.0 -rlp==2.0.1 -safe-eth-py[django]==4.8.2 -web3==5.31.3 +safe-eth-py[django] +web3 From 65e9ef6c6baf5698afd9c629b8077cf2d8e2271f Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Wed, 19 Apr 2023 17:41:54 +0200 Subject: [PATCH 17/20] resolve conflicts --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f6d239e1..84184fb2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ lxml==4.9.2 numpy==1.24.2 packaging==21.3 psycogreen==1.0.2 -# psycopg2-binary==2.9.1 +sycopg2-binary==2.9.1 psycopg2==2.9.5 redis==4.5.4 requests==2.28.1 From b4bd66a5f84eba660c227846e273f0d5232d6f9e Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Wed, 19 Apr 2023 17:43:41 +0200 Subject: [PATCH 18/20] fix typo --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 84184fb2..f3703271 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ lxml==4.9.2 numpy==1.24.2 packaging==21.3 psycogreen==1.0.2 -sycopg2-binary==2.9.1 +psycopg2-binary==2.9.1 psycopg2==2.9.5 redis==4.5.4 requests==2.28.1 From f2e40beec20c3275aec50f680afc87a0e62b5ca3 Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Thu, 20 Apr 2023 15:10:08 +0200 Subject: [PATCH 19/20] update CORS --- config/settings/production.py | 1 + 1 file changed, 1 insertion(+) diff --git a/config/settings/production.py b/config/settings/production.py index 5143a975..436f0ba5 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -59,6 +59,7 @@ # Django CORS CORS_ALLOWED_ORIGINS = env.list("CORS_ALLOWED_ORIGINS", default=[]) +CORS_ALLOWED_ORIGIN_REGEXES = env.list("CORS_ALLOWED_ORIGIN_REGEXES", default=[r"^https:\/\/\w+\.circles\.garden$"]) # SAFE From 2969befee0192235c2613690f8c0f72c778036dd Mon Sep 17 00:00:00 2001 From: JacqueGM Date: Thu, 20 Apr 2023 16:02:27 +0200 Subject: [PATCH 20/20] update corst regex --- config/settings/production.py | 1 - 1 file changed, 1 deletion(-) diff --git a/config/settings/production.py b/config/settings/production.py index 436f0ba5..f3d5f66c 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -58,7 +58,6 @@ # Django CORS -CORS_ALLOWED_ORIGINS = env.list("CORS_ALLOWED_ORIGINS", default=[]) CORS_ALLOWED_ORIGIN_REGEXES = env.list("CORS_ALLOWED_ORIGIN_REGEXES", default=[r"^https:\/\/\w+\.circles\.garden$"]) # SAFE