vc
This commit is contained in:
parent
2265982fba
commit
97295d2dfd
8 changed files with 13 additions and 27 deletions
12
Dockerfile
12
Dockerfile
|
@ -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
|
||||
|
||||
|
|
|
@ -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
3
env
|
@ -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"
|
|
@ -126,7 +126,7 @@ function delete_commentModal(id) {
|
|||
try {data = JSON.parse(xhr.response)}
|
||||
catch(e) {console.log(e)}
|
||||
if (xhr.status >= 200 && xhr.status < 300 && data && data['message']) {
|
||||
document.getElementById(`comment-${id}`).classList.add('deleted');
|
||||
document.getElementsByClassName(`comment-${id}-only`)[0].classList.add('deleted');
|
||||
document.getElementById(`delete-${id}`).classList.add('d-none');
|
||||
document.getElementById(`undelete-${id}`).classList.remove('d-none');
|
||||
document.getElementById(`delete2-${id}`).classList.add('d-none');
|
||||
|
|
|
@ -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":
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue