tweak env again
parent
356c9f1219
commit
00b045c464
|
@ -7,11 +7,6 @@ services:
|
||||||
- "./:/rDrama"
|
- "./:/rDrama"
|
||||||
- "./nginx.conf:/etc/nginx/sites-enabled/1"
|
- "./nginx.conf:/etc/nginx/sites-enabled/1"
|
||||||
- "./nginx-serve-static.conf:/etc/nginx/includes/serve-static"
|
- "./nginx-serve-static.conf:/etc/nginx/includes/serve-static"
|
||||||
env_file: env
|
|
||||||
environment:
|
|
||||||
- DATABASE_URL=postgresql://postgres@postgres:5432
|
|
||||||
- REDIS_URL=redis://redis
|
|
||||||
- PROXY_URL=http://opera-proxy:18080
|
|
||||||
links:
|
links:
|
||||||
- "redis"
|
- "redis"
|
||||||
- "postgres"
|
- "postgres"
|
||||||
|
|
78
env
78
env
|
@ -1,38 +1,40 @@
|
||||||
FLASK_APP=/rDrama/files/cli:app
|
export FLASK_APP="/rDrama/files/cli:app"
|
||||||
SITE=localhost
|
export SITE="localhost"
|
||||||
SITE_NAME=rDrama
|
export SITE_NAME="rDrama"
|
||||||
MASTER_KEY=blahblahblah
|
export SECRET_KEY="blahblahblah"
|
||||||
PROXY_URL=http://localhost:18080
|
export DATABASE_URL="postgresql://postgres@localhost:5432"
|
||||||
GIPHY_KEY=blahblahblah
|
export REDIS_URL="redis://localhost:6379"
|
||||||
DISCORD_SERVER_ID=blahblahblah
|
export PROXY_URL="http://localhost:18080"
|
||||||
DISCORD_CLIENT_ID=blahblahblah
|
export GIPHY_KEY="blahblahblah"
|
||||||
DISCORD_CLIENT_SECRET=blahblahblah
|
export DISCORD_SERVER_ID="blahblahblah"
|
||||||
DISCORD_BOT_TOKEN=blahblahblah
|
export DISCORD_CLIENT_ID="blahblahblah"
|
||||||
HCAPTCHA_SITEKEY=blahblahblah
|
export DISCORD_CLIENT_SECRET="blahblahblah"
|
||||||
HCAPTCHA_SECRET=blahblahblah
|
export DISCORD_BOT_TOKEN="blahblahblah"
|
||||||
YOUTUBE_KEY=blahblahblah
|
export HCAPTCHA_SITEKEY="blahblahblah"
|
||||||
PUSHER_ID=blahblahblah
|
export HCAPTCHA_SECRET="blahblahblah"
|
||||||
PUSHER_KEY=blahblahblah
|
export YOUTUBE_KEY="blahblahblah"
|
||||||
IMGUR_KEY=blahblahblah
|
export PUSHER_ID="blahblahblah"
|
||||||
SPAM_SIMILARITY_THRESHOLD=0.5
|
export PUSHER_KEY="blahblahblah"
|
||||||
SPAM_URL_SIMILARITY_THRESHOLD=0.1
|
export IMGUR_KEY="blahblahblah"
|
||||||
SPAM_SIMILAR_COUNT_THRESHOLD=10
|
export SPAM_SIMILARITY_THRESHOLD="0.5"
|
||||||
COMMENT_SPAM_SIMILAR_THRESHOLD=0.5
|
export SPAM_URL_SIMILARITY_THRESHOLD="0.1"
|
||||||
COMMENT_SPAM_COUNT_THRESHOLD=10
|
export SPAM_SIMILAR_COUNT_THRESHOLD="10"
|
||||||
DEFAULT_TIME_FILTER=all
|
export COMMENT_SPAM_SIMILAR_THRESHOLD="0.5"
|
||||||
GUMROAD_TOKEN=blahblahblah
|
export COMMENT_SPAM_COUNT_THRESHOLD="10"
|
||||||
GUMROAD_LINK=https://marsey1.gumroad.com/l/rdrama
|
export DEFAULT_TIME_FILTER="all"
|
||||||
GUMROAD_ID=rdrama
|
export GUMROAD_TOKEN="blahblahblah"
|
||||||
CARD_VIEW=0
|
export GUMROAD_LINK="https://marsey1.gumroad.com/l/rdrama"
|
||||||
DISABLE_DOWNVOTES=0
|
export GUMROAD_ID="rdrama"
|
||||||
DUES=0
|
export CARD_VIEW="0"
|
||||||
DEFAULT_THEME=midnight
|
export DISABLE_DOWNVOTES="0"
|
||||||
DEFAULT_COLOR=805ad5
|
export DUES="0"
|
||||||
EMAIL=blahblahblah@gmail.com
|
export DEFAULT_THEME="midnight"
|
||||||
MAILGUN_KEY=blahblahblah
|
export DEFAULT_COLOR="805ad5"
|
||||||
DESCRIPTION=rdrama.net caters to drama in all forms such as: Real life, videos, photos, gossip, rumors, news sites, Reddit, and Beyond™. There isn't drama we won't touch, and we want it all!
|
export EMAIL="blahblahblah@gmail.com"
|
||||||
CF_KEY=blahblahblah
|
export MAILGUN_KEY="blahblahblah"
|
||||||
CF_ZONE=blahblahblah
|
export DESCRIPTION="rdrama.net caters to drama in all forms such as: Real life, videos, photos, gossip, rumors, news sites, Reddit, and Beyond™. There isn't drama we won't touch, and we want it all!"
|
||||||
DEBIAN_FRONTEND=noninteractive
|
export CF_KEY="blahblahblah"
|
||||||
NODE_VERSION=16.13.0
|
export CF_ZONE="blahblahblah"
|
||||||
NVM_DIR=/root/.nvm
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
|
export NODE_VERSION="16.13.0"
|
||||||
|
export NVM_DIR="/root/.nvm"
|
||||||
|
|
|
@ -24,7 +24,7 @@ app.jinja_env.auto_reload = True
|
||||||
app.jinja_env.add_extension('jinja2.ext.do')
|
app.jinja_env.add_extension('jinja2.ext.do')
|
||||||
faulthandler.enable()
|
faulthandler.enable()
|
||||||
|
|
||||||
app.config['SECRET_KEY'] = environ.get('MASTER_KEY')
|
app.config['SECRET_KEY'] = environ.get('SECRET_KEY').strip()
|
||||||
app.config["SERVER_NAME"] = environ.get("SITE").strip()
|
app.config["SERVER_NAME"] = environ.get("SITE").strip()
|
||||||
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 3153600
|
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 3153600
|
||||||
app.config["SESSION_COOKIE_NAME"] = "session_" + environ.get("SITE_NAME").strip().lower()
|
app.config["SESSION_COOKIE_NAME"] = "session_" + environ.get("SITE_NAME").strip().lower()
|
||||||
|
@ -35,15 +35,15 @@ app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 365
|
||||||
app.config['SESSION_REFRESH_EACH_REQUEST'] = False
|
app.config['SESSION_REFRESH_EACH_REQUEST'] = False
|
||||||
|
|
||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||||
app.config['SQLALCHEMY_DATABASE_URL'] = environ.get("DATABASE_URL", "postgresql://postgres@localhost:5432")
|
app.config['SQLALCHEMY_DATABASE_URL'] = environ.get("DATABASE_URL").strip()
|
||||||
|
|
||||||
app.config["CACHE_TYPE"] = "RedisCache"
|
app.config["CACHE_TYPE"] = "RedisCache"
|
||||||
app.config["CACHE_REDIS_URL"] = environ.get("REDIS_URL", "redis://localhost")
|
app.config["CACHE_REDIS_URL"] = environ.get("REDIS_URL").strip()
|
||||||
|
|
||||||
|
|
||||||
app.config['SETTINGS'] = {}
|
app.config['SETTINGS'] = {}
|
||||||
|
|
||||||
r=redis.Redis(host=environ.get("REDIS_URL", "redis://localhost"), decode_responses=True, ssl_cert_reqs=None)
|
r=redis.Redis(host=environ.get("REDIS_URL").strip(), decode_responses=True, ssl_cert_reqs=None)
|
||||||
|
|
||||||
def get_CF():
|
def get_CF():
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
|
|
|
@ -12,7 +12,7 @@ from os import path
|
||||||
|
|
||||||
SITE = environ.get("SITE").strip()
|
SITE = environ.get("SITE").strip()
|
||||||
SITE_NAME = environ.get("SITE_NAME").strip()
|
SITE_NAME = environ.get("SITE_NAME").strip()
|
||||||
MASTER_KEY = environ.get("MASTER_KEY").strip()
|
SECRET_KEY = environ.get("SECRET_KEY").strip()
|
||||||
PROXY_URL = environ.get("PROXY_URL").strip()
|
PROXY_URL = environ.get("PROXY_URL").strip()
|
||||||
GIPHY_KEY = environ.get('GIPHY_KEY').strip()
|
GIPHY_KEY = environ.get('GIPHY_KEY').strip()
|
||||||
DISCORD_SERVER_ID = environ.get("DISCORD_SERVER_ID").strip()
|
DISCORD_SERVER_ID = environ.get("DISCORD_SERVER_ID").strip()
|
||||||
|
|
|
@ -6,7 +6,7 @@ def generate_hash(string):
|
||||||
|
|
||||||
msg = bytes(string, "utf-16")
|
msg = bytes(string, "utf-16")
|
||||||
|
|
||||||
return hmac.new(key=bytes(MASTER_KEY, "utf-16"),
|
return hmac.new(key=bytes(SECRET_KEY, "utf-16"),
|
||||||
msg=msg,
|
msg=msg,
|
||||||
digestmod='md5'
|
digestmod='md5'
|
||||||
).hexdigest()
|
).hexdigest()
|
||||||
|
|
|
@ -219,7 +219,7 @@ def sign_up_get(v):
|
||||||
|
|
||||||
formkey_hashstr = str(now) + token + g.agent
|
formkey_hashstr = str(now) + token + g.agent
|
||||||
|
|
||||||
formkey = hmac.new(key=bytes(MASTER_KEY, "utf-16"),
|
formkey = hmac.new(key=bytes(SECRET_KEY, "utf-16"),
|
||||||
msg=bytes(formkey_hashstr, "utf-16"),
|
msg=bytes(formkey_hashstr, "utf-16"),
|
||||||
digestmod='md5'
|
digestmod='md5'
|
||||||
).hexdigest()
|
).hexdigest()
|
||||||
|
@ -258,7 +258,7 @@ def sign_up_post(v):
|
||||||
|
|
||||||
correct_formkey_hashstr = form_timestamp + submitted_token + g.agent
|
correct_formkey_hashstr = form_timestamp + submitted_token + g.agent
|
||||||
|
|
||||||
correct_formkey = hmac.new(key=bytes(MASTER_KEY, "utf-16"),
|
correct_formkey = hmac.new(key=bytes(SECRET_KEY, "utf-16"),
|
||||||
msg=bytes(correct_formkey_hashstr, "utf-16"),
|
msg=bytes(correct_formkey_hashstr, "utf-16"),
|
||||||
digestmod='md5'
|
digestmod='md5'
|
||||||
).hexdigest()
|
).hexdigest()
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
. ./env
|
||||||
|
export DATABASE_URL="postgresql://postgres@postgres:5432"
|
||||||
|
export REDIS_URL="redis://redis:6379"
|
||||||
|
export PROXY_URL="http://opera-proxy:18080"
|
||||||
/etc/init.d/nginx start
|
/etc/init.d/nginx start
|
||||||
cd ./chat
|
cd ./chat
|
||||||
yarn install
|
yarn install
|
||||||
|
|
|
@ -6,7 +6,6 @@ apt -y install git redis-server python3-pip ffmpeg imagemagick tmux nginx snapd
|
||||||
git config --global credential.helper store
|
git config --global credential.helper store
|
||||||
cd /rDrama
|
cd /rDrama
|
||||||
cp ./env /env
|
cp ./env /env
|
||||||
sed -i 's/^/export /g;s/=/="/g;s/$/"/g' /env
|
|
||||||
. /env
|
. /env
|
||||||
|
|
||||||
mkdir /scripts
|
mkdir /scripts
|
||||||
|
|
Loading…
Reference in New Issue