Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable hosts requests #77

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .github/workflows/tagbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -21,29 +21,27 @@ 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@v2
uses: actions/checkout@v3

- name: Get ref
id: parse_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: |
doctl registry login

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
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 }}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
5 changes: 3 additions & 2 deletions config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
ALLOWED_HOSTS = [
"relayer-service",
env("HOST_RELAYER", default="localhost"),
env("DJANGO_ALLOWED_HOSTS", default="circles.garden"),
env("DJANGO_ALLOWED_HOSTS", default=".circles.garden"),
]


# DATABASES

DATABASES["default"]["ATOMIC_REQUESTS"] = False
Expand Down Expand Up @@ -57,7 +58,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

Expand Down
27 changes: 14 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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-celery-beat==2.4.0
django-cors-headers==3.13.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
hexbytes==0.2.2
lxml==4.9.1
numpy==1.23.3
hiredis==2.2.2
lxml==4.9.2
numpy==1.24.2
packaging==21.3
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
safe-eth-py[django]
web3