remotes/1693045480750635534/spooky-22
Aevann1 2022-02-22 15:34:41 +02:00
parent 513d10e25a
commit f56d9b893b
7 changed files with 12 additions and 26 deletions

View File

@ -1,16 +1,6 @@
FROM ubuntu:20.04
RUN apt update
RUN apt -y upgrade
RUN apt install -y supervisor
RUN apt install -y python3-pip
RUN apt install -y python3-enchant
RUN apt install -y libenchant1c2a
RUN apt update && apt -y upgrade && apt install -y supervisor python3-pip libenchant1c2a ffmpeg
COPY supervisord.conf /etc/supervisord.conf

View File

@ -6,7 +6,7 @@ services:
context: .
volumes:
- "./:/service"
env_file: ../env
env_file: env
environment:
- DATABASE_URL=postgresql://postgres@postgres:5432
- REDIS_URL=redis://redis

3
env
View File

@ -31,4 +31,5 @@ export MAIL_USERNAME="blahblahblah@gmail.com"
export MAIL_PASSWORD="3435tdfsdudebussylmaoxxt43"
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!"
export CF_KEY="3435tdfsdudebussylmaoxxt43"
export CF_ZONE="3435tdfsdudebussylmaoxxt43"
export CF_ZONE="3435tdfsdudebussylmaoxxt43"
export DEBIAN_FRONTEND="noninteractive"

View File

@ -17,14 +17,9 @@ import requests
from shutil import copyfile
from json import loads
from collections import Counter
from enchant import Dict
import nltk
nltk.download('words')
from nltk.corpus import words
words = set(WORDLE_LIST) | set(words.words())
words = set([x for x in words if len(x) == 5])
d = Dict("en_US")
IMGUR_KEY = environ.get("IMGUR_KEY").strip()
@ -1106,7 +1101,7 @@ def handle_wordle_action(cid, v):
try: guess = request.values.get("guess").strip().lower()
except: abort(400)
if len(guess) != 5 or guess not in words:
if len(guess) != 5 or not d.check(guess) and guess not in WORDLE_LIST:
return {"error": "Not a valid guess!"}, 400
if status == "active":

View File

@ -871,7 +871,7 @@
{% if v %}
<script src="/static/assets/js/marked.js?a=242"></script>
<script src="/static/assets/js/comments_v.js?a=256"></script>
<script src="/static/assets/js/comments_v.js?a=257"></script>
{% endif %}
<script src="/static/assets/js/clipboard.js?a=250"></script>

View File

@ -11,7 +11,6 @@ gunicorn
lxml
mistletoe
matplotlib
nltk
Pillow
psutil
pyotp
@ -21,6 +20,7 @@ requests
SQLAlchemy
psycopg2-binary
pusher_push_notifications
pyenchant
youtube-dl
yattag
webptools

View File

@ -1,7 +1,9 @@
cd /Drama
cp ./env /env
. /env
sudo apt update
sudo apt -y upgrade
sudo apt -y install postgresql postgresql-contrib redis-server python3-pip ffmpeg
sudo apt -y install postgresql postgresql-contrib redis-server python3-pip libenchant1c2a ffmpeg
cp pg_hba.conf /etc/postgresql/12/main/pg_hba.conf
sudo service postgresql restart
sudo psql -U postgres -f schema.sql postgres
@ -10,6 +12,4 @@ sudo pip3 install -r requirements.txt
mkdir /songs
mkdir /images
. imei.sh
cp ./env /env
. /env
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