forked from rDrama/rDrama
dfdf
parent
237ee3620a
commit
47688b00ec
|
@ -20,9 +20,6 @@ services:
|
||||||
- CLOUDFLARE_ZONE=vcxvdfgfc6r554etrgd
|
- CLOUDFLARE_ZONE=vcxvdfgfc6r554etrgd
|
||||||
- CLOUDFLARE_KEY=vcxvdfgfc6r554etrgd
|
- CLOUDFLARE_KEY=vcxvdfgfc6r554etrgd
|
||||||
- TENOR_KEY=vcxvdfgfc6r554etrgd
|
- TENOR_KEY=vcxvdfgfc6r554etrgd
|
||||||
- S3_BUCKET_NAME=i.ruqqus.ga
|
|
||||||
- AWS_ACCESS_KEY_ID=vcxvdfgfc6r554etrgd
|
|
||||||
- AWS_SECRET_ACCESS_KEY=vcxvdfgfc6r554etrgd
|
|
||||||
- MAILGUN_KEY=vcxvdfgfc6r554etrgd
|
- MAILGUN_KEY=vcxvdfgfc6r554etrgd
|
||||||
- admin_email=drama@rdrama.net
|
- admin_email=drama@rdrama.net
|
||||||
- FORCE_HTTPS=0
|
- FORCE_HTTPS=0
|
||||||
|
|
|
@ -97,8 +97,6 @@ app.config["CACHE_REDIS_URL"] = environ.get(
|
||||||
app.config["CACHE_DEFAULT_TIMEOUT"] = 60
|
app.config["CACHE_DEFAULT_TIMEOUT"] = 60
|
||||||
app.config["CACHE_KEY_PREFIX"] = "flask_caching_"
|
app.config["CACHE_KEY_PREFIX"] = "flask_caching_"
|
||||||
|
|
||||||
app.config["S3_BUCKET"]=environ.get("S3_BUCKET_NAME","i.rdrama.net").strip()
|
|
||||||
|
|
||||||
app.config["REDIS_POOL_SIZE"]=int(environ.get("REDIS_POOL_SIZE", 10))
|
app.config["REDIS_POOL_SIZE"]=int(environ.get("REDIS_POOL_SIZE", 10))
|
||||||
|
|
||||||
redispool=ConnectionPool(
|
redispool=ConnectionPool(
|
||||||
|
|
|
@ -3,7 +3,7 @@ from secrets import token_hex
|
||||||
import pyotp
|
import pyotp
|
||||||
|
|
||||||
from drama.helpers.discord import delete_role
|
from drama.helpers.discord import delete_role
|
||||||
from drama.helpers.aws import *
|
from drama.helpers.images import *
|
||||||
from .alts import Alt
|
from .alts import Alt
|
||||||
from .submission import SaveRelationship
|
from .submission import SaveRelationship
|
||||||
from .comment import Notification
|
from .comment import Notification
|
||||||
|
|
|
@ -175,7 +175,6 @@ def check_csam(post):
|
||||||
|
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
# nuke aws
|
|
||||||
delete_file(parsed_url.path.lstrip('/'))
|
delete_file(parsed_url.path.lstrip('/'))
|
||||||
db.close()
|
db.close()
|
||||||
return
|
return
|
||||||
|
@ -209,7 +208,6 @@ def check_csam(post):
|
||||||
|
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
# nuke aws
|
|
||||||
delete_file(parsed_url.path.lstrip('/'))
|
delete_file(parsed_url.path.lstrip('/'))
|
||||||
|
|
||||||
remove(tempname)
|
remove(tempname)
|
||||||
|
@ -276,7 +274,6 @@ def check_csam_url(url, v, delete_content_function):
|
||||||
|
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
# nuke aws
|
|
||||||
delete_file(parsed_url.path.lstrip('/'))
|
delete_file(parsed_url.path.lstrip('/'))
|
||||||
|
|
||||||
remove(tempname)
|
remove(tempname)
|
|
@ -12,7 +12,7 @@ from drama.helpers.sanitize import *
|
||||||
from drama.helpers.markdown import *
|
from drama.helpers.markdown import *
|
||||||
from drama.helpers.security import *
|
from drama.helpers.security import *
|
||||||
from drama.helpers.get import *
|
from drama.helpers.get import *
|
||||||
from drama.helpers.aws import *
|
from drama.helpers.imageupload import *
|
||||||
from drama.classes import *
|
from drama.classes import *
|
||||||
from drama.classes.domains import reasons as REASONS
|
from drama.classes.domains import reasons as REASONS
|
||||||
from flask import *
|
from flask import *
|
||||||
|
@ -465,7 +465,7 @@ def admin_domain_domain(domain_name, v):
|
||||||
def admin_image_purge(v):
|
def admin_image_purge(v):
|
||||||
|
|
||||||
url=request.form.get("url")
|
url=request.form.get("url")
|
||||||
aws.delete_file(url)
|
images.delete_file(url)
|
||||||
return redirect("/admin/image_purge")
|
return redirect("/admin/image_purge")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from drama.helpers.wrappers import *
|
from drama.helpers.wrappers import *
|
||||||
from drama.helpers.filters import *
|
from drama.helpers.filters import *
|
||||||
from drama.helpers.alerts import *
|
from drama.helpers.alerts import *
|
||||||
from drama.helpers.aws import *
|
from drama.helpers.images import *
|
||||||
from drama.helpers.session import *
|
from drama.helpers.session import *
|
||||||
from drama.classes import *
|
from drama.classes import *
|
||||||
from drama.routes.front import comment_idlist
|
from drama.routes.front import comment_idlist
|
||||||
|
@ -754,21 +754,6 @@ def edit_comment(cid, v):
|
||||||
body_md = renderer.render(mistletoe.Document(body))
|
body_md = renderer.render(mistletoe.Document(body))
|
||||||
body_html = sanitize(body_md, linkgen=True)
|
body_html = sanitize(body_md, linkgen=True)
|
||||||
|
|
||||||
# #csam detection
|
|
||||||
# def del_function():
|
|
||||||
# delete_file(name)
|
|
||||||
# c.is_banned=True
|
|
||||||
# g.db.add(c)
|
|
||||||
# g.db.commit()
|
|
||||||
|
|
||||||
# csam_thread=threading.Thread(target=check_csam_url,
|
|
||||||
# args=(f"https://s3.eu-central-1.amazonaws.com/i.ruqqus.ga/{name}",
|
|
||||||
# v,
|
|
||||||
# del_function
|
|
||||||
# )
|
|
||||||
# )
|
|
||||||
# csam_thread.start()
|
|
||||||
|
|
||||||
c.body = body
|
c.body = body
|
||||||
c.body_html = body_html
|
c.body_html = body_html
|
||||||
|
|
||||||
|
|
|
@ -77,17 +77,17 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<a href="/submit">
|
<a href="/submit">
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
placeholder="Share something dramatic..." aria-label="Username"
|
placeholder="Post..." aria-label="Username"
|
||||||
aria-describedby="basic-addon1">
|
aria-describedby="basic-addon1">
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/signup">
|
<a href="/signup">
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
placeholder="Share something dramatic..." aria-label="Username"
|
placeholder="Post..." aria-label="Username"
|
||||||
aria-describedby="basic-addon1">
|
aria-describedby="basic-addon1">
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@ docker-compose up
|
||||||
|
|
||||||
4- That's it! Visit `localhost` in your browser.
|
4- That's it! Visit `localhost` in your browser.
|
||||||
|
|
||||||
5- Optional: to configure the site settings and successsfully integrate it with the external services we use (hcaptcha, cloudflare, aws S3, discord, tenor and mailgun), please edit the variables in the docker-compose.yml file.
|
5- Optional: to configure the site settings and successsfully integrate it with the external services we use (hcaptcha, cloudflare, discord, tenor and mailgun), please edit the variables in the docker-compose.yml file.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ source setup
|
||||||
4- That's it. Visit `localhost` in your browser.
|
4- That's it. Visit `localhost` in your browser.
|
||||||
|
|
||||||
|
|
||||||
5- Optional: to configure the site settings and successsfully integrate it with the external services we use (hcaptcha, cloudflare, aws S3, discord, tenor and mailgun), please run this command and edit the variables:
|
5- Optional: to configure the site settings and successsfully integrate it with the external services we use (hcaptcha, cloudflare, discord, tenor and mailgun), please run this command and edit the variables:
|
||||||
|
|
||||||
```
|
```
|
||||||
nano /drama/docker-compose.yml
|
nano /drama/docker-compose.yml
|
||||||
|
|
Loading…
Reference in New Issue