sfd
This commit is contained in:
parent
778edaef60
commit
764805f088
3 changed files with 9 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
import gevent.monkey
|
import gevent.monkey
|
||||||
gevent.monkey.patch_all()
|
gevent.monkey.patch_all()
|
||||||
from os import environ
|
from os import environ, path
|
||||||
import secrets
|
import secrets
|
||||||
from flask import *
|
from flask import *
|
||||||
from flask_caching import Cache
|
from flask_caching import Cache
|
||||||
|
@ -17,6 +17,10 @@ from sys import stdout
|
||||||
import faulthandler
|
import faulthandler
|
||||||
from json import loads
|
from json import loads
|
||||||
|
|
||||||
|
f = 'files/templates/sidebar_' + environ.get("SITE_NAME").strip().lower() + '.html'
|
||||||
|
if not path.exists(f):
|
||||||
|
with open(f, 'w'): pass
|
||||||
|
|
||||||
app = Flask(__name__, template_folder='templates')
|
app = Flask(__name__, template_folder='templates')
|
||||||
app.url_map.strict_slashes = False
|
app.url_map.strict_slashes = False
|
||||||
app.jinja_env.cache = {}
|
app.jinja_env.cache = {}
|
||||||
|
|
|
@ -564,5 +564,5 @@ FORTUNE_REPLIES = ('<b style="color:#6023f8">Your fortune: Allah Wills It</b>','
|
||||||
|
|
||||||
no_pass_phrase = """<p>Sorry whiteboy, we're gonna need to see some ID before you start throwin that word around like it's nothing.\n\nTake a 10 minute time-out and come back when you've learned your lesson and/or paid reparations (by purchasing a BIPOC Approved™ Rdrama NWord Pass© from the <a href="/shop">shop</a>) \n\n<em>This is an automated message; if you need help, you can message us <a href="/contact">here</a>.</em></p>"""
|
no_pass_phrase = """<p>Sorry whiteboy, we're gonna need to see some ID before you start throwin that word around like it's nothing.\n\nTake a 10 minute time-out and come back when you've learned your lesson and/or paid reparations (by purchasing a BIPOC Approved™ Rdrama NWord Pass© from the <a href="/shop">shop</a>) \n\n<em>This is an automated message; if you need help, you can message us <a href="/contact">here</a>.</em></p>"""
|
||||||
|
|
||||||
if SITE == 'rdrama.net': subs = ('2balkan4u','2middleeast4u')
|
if SITE in ('rdrama.net','too4you.net'): subs = ('2balkan4you','2middleeast4you')
|
||||||
else: subs = ()
|
else: subs = ()
|
6
setup
6
setup
|
@ -1,9 +1,9 @@
|
||||||
cd /drama
|
cd /Drama
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt -y upgrade
|
sudo apt -y upgrade
|
||||||
sudo apt -y install postgresql postgresql-contrib
|
sudo apt -y install postgresql postgresql-contrib
|
||||||
sudo apt -y install redis-server
|
sudo apt -y install redis-server
|
||||||
cp pg_hba.conf /etc/postgresql/13/main/pg_hba.conf
|
cp pg_hba.conf /etc/postgresql/12/main/pg_hba.conf
|
||||||
sudo service postgresql restart
|
sudo service postgresql restart
|
||||||
sudo psql -U postgres -f schema.sql postgres
|
sudo psql -U postgres -f schema.sql postgres
|
||||||
sudo psql -U postgres -f seed-db.sql postgres
|
sudo psql -U postgres -f seed-db.sql postgres
|
||||||
|
@ -15,4 +15,4 @@ mkdir /songs
|
||||||
mkdir /images
|
mkdir /images
|
||||||
cp ./env.sh /env.sh
|
cp ./env.sh /env.sh
|
||||||
. /env.sh
|
. /env.sh
|
||||||
sudo -E gunicorn files.__main__:app -k gevent -w 2 --reload -b localhost:80 --max-requests 1000 --max-requests-jitter 500
|
sudo -E gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80:80 --max-requests 1000 --max-requests-jitter 500
|
Loading…
Add table
Add a link
Reference in a new issue