File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ SECRET_KEY =
2+ DEBUG = True
3+
4+ # # Super-User Credentials
5+ SUPER_USER_NAME =
6+ SUPER_USER_PASSWORD =
7+ SUPER_USER_EMAIL =
Original file line number Diff line number Diff line change 1+ FROM python:3.8.5-alpine
2+
3+ RUN pip install --upgrade pip
4+ RUN pip install tzdata
5+ RUN apk update && apk add gcc musl-dev
6+ RUN apk add --no-cache bash coreutils grep sed
7+
8+
9+ COPY ./requirements.txt .
10+ RUN pip install -r requirements.txt
11+
12+ COPY . /app
13+
14+ WORKDIR /app
15+
16+ COPY ./init.sh /
17+ ENTRYPOINT ["sh" , "/init.sh" ]
Original file line number Diff line number Diff line change 3030# SECURITY WARNING: don't run with debug turned on in production!
3131DEBUG = True
3232
33- ALLOWED_HOSTS = []
33+ ALLOWED_HOSTS = ['127.0.0.1' , '0.0.0.0' , 'localhost' ]
3434
3535
3636# Application definition
123123# https://docs.djangoproject.com/en/4.1/howto/static-files/
124124
125125STATIC_URL = "static/"
126+ STATIC_ROOT = BASE_DIR / "static"
126127
127128# Default primary key field type
128129# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
129130
130- DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
131+ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
Original file line number Diff line number Diff line change 1515"""
1616from django .contrib import admin
1717from django .urls import path
18+ from django .conf import settings
19+ from django .conf .urls .static import static
1820from bundler import bundler
1921from bundler import paymaster
2022from bundler import explorer
2527 path ("jsonrpc/bundler" , bundler .jsonrpc ),
2628 path ("jsonrpc/paymaster" , paymaster .jsonrpc ),
2729 path ("jsonrpc/explorer" , explorer .jsonrpc ),
28- ]
30+ ]+ static ( settings . STATIC_URL , document_root = settings . STATIC_ROOT )
Original file line number Diff line number Diff line change 1+ version : ' 3.7'
2+
3+ services :
4+ django_gunicorn :
5+ volumes :
6+ - static:/static
7+ env_file :
8+ - .env
9+ build :
10+ context : .
11+ ports :
12+ - " 8001:8001"
13+
14+ volumes :
15+ static:
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ python manage.py makemigrations bundler
4+ python manage.py migrate
5+ python manage.py loaddata bundler/tokenSeed.json
6+ python manage.py collectstatic --no-input
7+
8+ DJANGO_SUPERUSER_PASSWORD=$SUPER_USER_PASSWORD python manage.py createsuperuser --username $SUPER_USER_NAME --email $SUPER_USER_EMAIL --noinput
9+
10+ gunicorn bundler.wsgi:application --bind 0.0.0.0:8001
Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ web3==5.31.0
66django == 4.1.1
77eth_abi == 2.2.0
88gnosis == 0.1.1
9- safe-eth-py == 4.5.1
9+ safe-eth-py == 4.5.1
10+ gunicorn == 20.0.4
You can’t perform that action at this time.
0 commit comments