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
|
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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
1
env
1
env
|
@ -32,3 +32,4 @@ 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"
|
|
@ -126,7 +126,7 @@ function delete_commentModal(id) {
|
||||||
try {data = JSON.parse(xhr.response)}
|
try {data = JSON.parse(xhr.response)}
|
||||||
catch(e) {console.log(e)}
|
catch(e) {console.log(e)}
|
||||||
if (xhr.status >= 200 && xhr.status < 300 && data && data['message']) {
|
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(`delete-${id}`).classList.add('d-none');
|
||||||
document.getElementById(`undelete-${id}`).classList.remove('d-none');
|
document.getElementById(`undelete-${id}`).classList.remove('d-none');
|
||||||
document.getElementById(`delete2-${id}`).classList.add('d-none');
|
document.getElementById(`delete2-${id}`).classList.add('d-none');
|
||||||
|
|
|
@ -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":
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue