dfdf
This commit is contained in:
parent
112e83648e
commit
757eb8cadc
8 changed files with 16 additions and 39 deletions
|
@ -20,9 +20,6 @@ services:
|
|||
- CLOUDFLARE_ZONE=vcxvdfgfc6r554etrgd
|
||||
- CLOUDFLARE_KEY=vcxvdfgfc6r554etrgd
|
||||
- TENOR_KEY=vcxvdfgfc6r554etrgd
|
||||
- S3_BUCKET_NAME=i.ruqqus.ga
|
||||
- AWS_ACCESS_KEY_ID=vcxvdfgfc6r554etrgd
|
||||
- AWS_SECRET_ACCESS_KEY=vcxvdfgfc6r554etrgd
|
||||
- MAILGUN_KEY=vcxvdfgfc6r554etrgd
|
||||
- admin_email=drama@rdrama.net
|
||||
- FORCE_HTTPS=0
|
||||
|
|
|
@ -97,8 +97,6 @@ app.config["CACHE_REDIS_URL"] = environ.get(
|
|||
app.config["CACHE_DEFAULT_TIMEOUT"] = 60
|
||||
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))
|
||||
|
||||
redispool=ConnectionPool(
|
||||
|
|
|
@ -3,7 +3,7 @@ from secrets import token_hex
|
|||
import pyotp
|
||||
|
||||
from drama.helpers.discord import delete_role
|
||||
from drama.helpers.aws import *
|
||||
from drama.helpers.images import *
|
||||
from .alts import Alt
|
||||
from .submission import SaveRelationship
|
||||
from .comment import Notification
|
||||
|
|
|
@ -175,7 +175,6 @@ def check_csam(post):
|
|||
|
||||
db.commit()
|
||||
|
||||
# nuke aws
|
||||
delete_file(parsed_url.path.lstrip('/'))
|
||||
db.close()
|
||||
return
|
||||
|
@ -209,7 +208,6 @@ def check_csam(post):
|
|||
|
||||
db.commit()
|
||||
|
||||
# nuke aws
|
||||
delete_file(parsed_url.path.lstrip('/'))
|
||||
|
||||
remove(tempname)
|
||||
|
@ -276,7 +274,6 @@ def check_csam_url(url, v, delete_content_function):
|
|||
|
||||
db.commit()
|
||||
|
||||
# nuke aws
|
||||
delete_file(parsed_url.path.lstrip('/'))
|
||||
|
||||
remove(tempname)
|
|
@ -12,7 +12,7 @@ from drama.helpers.sanitize import *
|
|||
from drama.helpers.markdown import *
|
||||
from drama.helpers.security import *
|
||||
from drama.helpers.get import *
|
||||
from drama.helpers.aws import *
|
||||
from drama.helpers.imageupload import *
|
||||
from drama.classes import *
|
||||
from drama.classes.domains import reasons as REASONS
|
||||
from flask import *
|
||||
|
@ -465,7 +465,7 @@ def admin_domain_domain(domain_name, v):
|
|||
def admin_image_purge(v):
|
||||
|
||||
url=request.form.get("url")
|
||||
aws.delete_file(url)
|
||||
images.delete_file(url)
|
||||
return redirect("/admin/image_purge")
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from drama.helpers.wrappers import *
|
||||
from drama.helpers.filters import *
|
||||
from drama.helpers.alerts import *
|
||||
from drama.helpers.aws import *
|
||||
from drama.helpers.images import *
|
||||
from drama.helpers.session import *
|
||||
from drama.classes import *
|
||||
from drama.routes.front import comment_idlist
|
||||
|
@ -753,21 +753,6 @@ def edit_comment(cid, v):
|
|||
with CustomRenderer(post_id=c.parent_submission) as renderer:
|
||||
body_md = renderer.render(mistletoe.Document(body))
|
||||
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_html = body_html
|
||||
|
|
|
@ -77,17 +77,17 @@
|
|||
</div>
|
||||
<div class="card-body">
|
||||
{% if v %}
|
||||
<a href="/submit">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="Share something dramatic..." aria-label="Username"
|
||||
aria-describedby="basic-addon1">
|
||||
</a>
|
||||
<a href="/submit">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="Post..." aria-label="Username"
|
||||
aria-describedby="basic-addon1">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="/signup">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="Share something dramatic..." aria-label="Username"
|
||||
aria-describedby="basic-addon1">
|
||||
</a>
|
||||
<a href="/signup">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="Post..." aria-label="Username"
|
||||
aria-describedby="basic-addon1">
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -24,7 +24,7 @@ docker-compose up
|
|||
|
||||
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.
|
||||
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue