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 FROM ubuntu:20.04
RUN apt update RUN apt update && apt -y upgrade && apt install -y supervisor python3-pip libenchant1c2a ffmpeg
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
COPY supervisord.conf /etc/supervisord.conf COPY supervisord.conf /etc/supervisord.conf

View File

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

3
env
View File

@ -31,4 +31,5 @@ export MAIL_USERNAME="blahblahblah@gmail.com"
export MAIL_PASSWORD="3435tdfsdudebussylmaoxxt43" 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 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_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 shutil import copyfile
from json import loads from json import loads
from collections import Counter from collections import Counter
from enchant import Dict
import nltk d = Dict("en_US")
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])
IMGUR_KEY = environ.get("IMGUR_KEY").strip() 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() try: guess = request.values.get("guess").strip().lower()
except: abort(400) 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 return {"error": "Not a valid guess!"}, 400
if status == "active": if status == "active":

View File

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

View File

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

View File

@ -1,7 +1,9 @@
cd /Drama cd /Drama
cp ./env /env
. /env
sudo apt update sudo apt update
sudo apt -y upgrade 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 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
@ -10,6 +12,4 @@ sudo pip3 install -r requirements.txt
mkdir /songs mkdir /songs
mkdir /images mkdir /images
. imei.sh . 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 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