From f46c5fb7d6cc1640ef63d8975493437a9c3b54c1 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 29 Jun 2025 19:14:55 -0400 Subject: [PATCH] server fixes --- db.sqlite3 | Bin 135168 -> 135168 bytes gunicorn_config.py | 17 +++++ requirements.txt | 137 ------------------------------------- shrinkinminkin/settings.py | 10 +-- shrinkinminkin/wsgi.py | 4 +- web/templates/base.html | 3 +- web/views.py | 3 +- 7 files changed, 28 insertions(+), 146 deletions(-) create mode 100644 gunicorn_config.py diff --git a/db.sqlite3 b/db.sqlite3 index f6ef814adc656b516b12411c61a0ae6fba9cb3fc..8986d0a54195aadaf6c35cd0f32f47a47d6c4109 100644 GIT binary patch delta 2162 zcma)-e`p(39Khe@k|uY#%QtBg5fu$?!YVXoxVg5ns6OgGejHc=Eo{6j(Sy{;+3yVHbx{z*RX z`!4t4UV9_a-blQBr?hYFt_NfLP~nA4w|efLp#unR!hxQa-wU^8Bl4J3U8pS8>c=Y8 z6Z1>Q7VEWKr!tXH5C$#S!DXy(~QAyB2vmbRXuIGDK-yQw6 zkb_kOf5PwZi~rC40N=t_@Fjc(pTdXmKJ?%nxBzd$>+lM^1kb~2cVz}zFs+|^Ms4OXQ6=DB=!C3@cl?}C3$|(q3Ntcu|nXb$)&M(y-o^Les^~V?HW}EpvWK@oC-G6J0y8Qk- z6VxhD+cpfRlpWYqWYZ9v(9(#~+8%C*bR$@&j$Ila3@?i8Vu)>#Qijwb>f(%)L^(HvYimybW8fcc3UFd4bhFFrzt4&z*aF> zq!S$CW5-MG_(V9LghYoO>Zv;m2&*F@*L0&*LJ+2!2(2B9|_LSa!u;Rw*6L_2>T9S0w5Gb7srYfRkVp-pkjZ@S?p&Huw4ms}P@-9rv`MyTZ19x!=q)vc zo+?EJp&leGBsURy_U5ext0#N&EJEGg*4S*5%U+&$o_XKjJG;6aU)_$kuBmK&YHo}v zaOGvE@FqE)SHL0o>T0POu->}b&Sx*HT6-l+B8t-9$=<$lDH6@Z3yb+$(OJkBs^!{3 z#VNXn*`G5BEIE?IfEKklHr#JcIu(!TT_v%ncROo4y4&4)7>P$fPXYU&=U!a?0Ae?y z57hRjt(3d>@zyUlcJL?psug=5`>amBjU9N$!L9;+fL*V+2R7dwsgvz5uM?Z!kJRZY zP1{gF57a<9v7cxs=JnrtM_<&hYx~+pXRWR^?`q@9?CeCEAi^_9WQdg_L?R|RhXzNS z@KHn<%Z|O2^FHvgQ=PjIc#@%NDzO1MXNXxtNz+3XEtPYnvTvC`A6RaNYKdeRa*P-v zqX?r7yU`%I(({rpx-$`orq7gP0Zoie^Q4_-e_|q!ktM9EohvxiLeNnBY(w4(Ey)c? zIOW1TeZwgtD1Bttaxa``_7h)p|6Cx-hRU0k#26B02!ukYPbewbm5Spfy<}INns2)| z9@sLWBSKJNP?K akYIx*b(o2HFTs17CNpp-rT;{b0nuO5SQDZE diff --git a/gunicorn_config.py b/gunicorn_config.py new file mode 100644 index 0000000..d5d092a --- /dev/null +++ b/gunicorn_config.py @@ -0,0 +1,17 @@ +import os + + + +workers = int(os.environ.get('GUNICORN_PROCESSES', '2')) + +threads = int(os.environ.get('GUNICORN_THREADS', '4')) + +# timeout = int(os.environ.get('GUNICORN_TIMEOUT', '120')) + +bind = os.environ.get('GUNICORN_BIND', '0.0.0.0:8089') + + + +forwarded_allow_ips = '*' + +secure_scheme_headers = { 'X-Forwarded-Proto': 'https' } diff --git a/requirements.txt b/requirements.txt index 9661ed3..e69de29 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,137 +0,0 @@ -appdirs==1.4.4 -argcomplete==3.1.4 -attrs==23.2.0 -beautifulsoup4==4.12.3 -blinker==1.7.0 -bottle==0.12.25 -Brlapi==0.8.5 -Brotli==1.1.0 -certifi==2023.11.17 -chardet==5.2.0 -click==8.1.6 -colorama==0.4.6 -command-not-found==0.3 -configobj==5.0.8 -contourpy==1.0.7 -cryptography==41.0.7 -cupshelpers==1.0 -cycler==0.11.0 -dbus-python==1.3.2 -decorator==5.1.1 -defer==1.0.6 -defusedxml==0.7.1 -deprecation==2.0.7 -dill==0.3.8 -distro==1.9.0 -docker==5.0.3 -eyed3==0.9.7 -filelock==3.13.1 -filetype==1.2.0 -fonttools==4.46.0 -fs==2.4.16 -Glances==3.4.0.3 -gyp==0.1 -html2text==2024.2.26 -httplib2==0.20.4 -idna==3.6 -ifaddr==0.2.0 -IMDbPY==2021.4.18 -influxdb==5.3.1 -kiwisolver==0.0.0 -launchpadlib==1.11.0 -lazr.restfulclient==0.14.6 -lazr.uri==1.0.6 -libevdev==0.5 -libvirt-python==10.0.0 -louis==3.29.0 -lxml==5.2.1 -lz4==4.0.2+dfsg -Mako==1.3.2.dev0 -Markdown==3.5.2 -markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -matplotlib==3.6.3 -mdurl==0.1.2 -mpmath==0.0.0 -msgpack==1.0.3 -multiprocess==0.70.16 -mutagen==1.46.0 -nemo-emblems==6.4.0 -netaddr==0.8.0 -netifaces==0.11.0 -nicotine-plus==3.2.9 -numpy==1.26.4 -oauthlib==3.2.2 -onboard==1.4.1 -packaging==24.0 -PAM==0.4.2 -pexpect==4.9.0 -pillow==10.2.0 -pipx==1.4.3 -platformdirs==4.2.0 -ply==3.11 -psutil==5.9.8 -ptyprocess==0.7.0 -pulsemixer==1.5.1 -pyasn1==0.4.8 -pyasyncore==1.0.2 -pycairo==1.25.1 -pycryptodomex==3.20.0 -pycups==2.0.1 -pycurl==7.45.3 -pyelftools==0.30 -Pygments==2.17.2 -PyGObject==3.48.2 -PyICU==2.12 -pyinotify==0.9.6 -PyJWT==2.7.0 -PyNaCl==1.5.0 -pyparsing==3.1.1 -pyparted==3.12.0 -pypng==0.20231004.0 -pysmi==0.3.4 -pysnmp==4.4.12 -pystache==0.6.0 -python-apt==2.7.7+ubuntu4 -python-dateutil==2.8.2 -python-debian==0.1.49+ubuntu2 -python-gnupg==0.5.2 -python-magic==0.4.27 -python-xlib==0.33 -pytz==2024.1 -pyudev==0.24.0 -pyxdg==0.28 -PyYAML==6.0.1 -qrcode==7.4.2 -ranger-fm==1.9.3 -repolib==2.2.1 -requests==2.31.0 -requests-file==1.5.1 -rich==13.7.1 -SciPy==1.11.4 -setproctitle==1.3.3 -setuptools==68.1.2 -six==1.16.0 -soupsieve==2.5 -sympy==1.12 -systemd-python==235 -tinycss2==1.2.1 -tldextract==3.1.2 -typing_extensions==4.10.0 -ubuntu-drivers-common==0.0.0 -ufoLib2==0.16.0 -ufw==0.36.2 -ujson==5.9.0 -unicodedata2==15.1.0 -Unidecode==1.3.8 -urllib3==2.0.7 -userpath==1.9.1 -wadllib==1.3.6 -webencodings==0.5.1 -websocket-client==1.7.0 -websockets==10.4 -wheel==0.42.0 -xdg==5 -xkit==0.0.0 -xlrd==2.0.1 -yt-dlp==2024.4.9 diff --git a/shrinkinminkin/settings.py b/shrinkinminkin/settings.py index a385b9c..152d14f 100644 --- a/shrinkinminkin/settings.py +++ b/shrinkinminkin/settings.py @@ -20,12 +20,14 @@ BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'django-insecure-)z5-$t&%njx^$4wrsq4+@#oybrssf_z*1(p9t(^o2v!2nkybab' +SECRET_KEY = 'wiuweofuwnfowenfwoeuf$t&%njx^$4wrsq4+@#oybrssf_z*1(p9t(^o2v!2nkybab' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False -ALLOWED_HOSTS = ['localhost', 'localhost:8000', '127.0.0.1'] +ALLOWED_HOSTS = ['localhost', 'localhost:8000', '127.0.0.1', 'shrinkinminkin.com', 'www.shrinkinminkin.com'] + +CSRF_TRUSTED_ORIGINS = ['https://www.shrinkinminkin.com', 'https://shrinkinminkin.com'] # Application definition @@ -117,7 +119,7 @@ USE_TZ = True STATIC_URL = 'static/' STATIC_URL = '/static/' -STATIC_ROOT = BASE_DIR / 'staticfiles' +STATIC_ROOT = BASE_DIR / 'static' STATICFILES_DIRS = [BASE_DIR / 'static',] STORAGES = { "staticfiles": { diff --git a/shrinkinminkin/wsgi.py b/shrinkinminkin/wsgi.py index 5f4ec3a..cf18b8b 100644 --- a/shrinkinminkin/wsgi.py +++ b/shrinkinminkin/wsgi.py @@ -1,10 +1,10 @@ """ -WSGI config for shrinkinminkin project. +WSGI config for korabo project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/ """ import os diff --git a/web/templates/base.html b/web/templates/base.html index 2fe6c9a..c109775 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -16,7 +16,8 @@ position: fixed; bottom:0; right: 0; - margin:20px"> + margin:20px; + z-index: 999999;"> {{ message }}