mirror of
https://codeberg.org/pluja/kycnot.me
synced 2025-08-07 22:13:12 -04:00
Improve donations page
This commit is contained in:
parent
5390772be8
commit
2a6a42f2d6
3 changed files with 10 additions and 18 deletions
17
Dockerfile
17
Dockerfile
|
@ -1,18 +1,13 @@
|
|||
FROM python:3-alpine AS base
|
||||
# Image to Build Dependencies
|
||||
FROM base AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./requirements.txt /app
|
||||
|
||||
# Build Dependencies
|
||||
RUN apk update \
|
||||
&& apk add --virtual build-deps gcc python3-dev musl-dev \
|
||||
&& apk --no-cache add musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev make g++ \
|
||||
&& apk add jpeg-dev zlib-dev libjpeg \
|
||||
&& pip install Pillow \
|
||||
&& apk del build-deps
|
||||
RUN apk update
|
||||
RUN apk add musl-dev musl-dev g++ gcc make python3-dev build-base
|
||||
RUN apk add libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev
|
||||
RUN apk add jpeg-dev zlib-dev libjpeg
|
||||
|
||||
# Python Dependencies
|
||||
RUN pip install --no-cache-dir --prefix=/install gunicorn
|
||||
|
@ -20,13 +15,11 @@ RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
|
|||
|
||||
# Runtime Environment Image
|
||||
FROM base
|
||||
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Runtime Dependencies
|
||||
RUN apk --no-cache add libxml2 libxslt
|
||||
COPY --from=builder /install /usr/local
|
||||
COPY . /app/
|
||||
|
||||
EXPOSE 1337
|
||||
CMD gunicorn kycnot:app --bind 0.0.0.0:1337 --worker-class sanic.worker.GunicornWorker
|
|
@ -13,7 +13,7 @@ from random import randrange
|
|||
import ruamel.yaml
|
||||
import datetime
|
||||
import os.path
|
||||
import qrcode
|
||||
#import qrcode
|
||||
import httpx
|
||||
import os
|
||||
import re
|
||||
|
@ -62,7 +62,7 @@ async def about(request):
|
|||
r = httpx.get(
|
||||
"https://codeberg.org/schylza/schylza/raw/branch/main/SUPPORT.md")
|
||||
donations = yaml.load(r.content)
|
||||
await generate_donations_qrcodes(donations)
|
||||
#await generate_donations_qrcodes(donations)
|
||||
return html(template.render(date=date, title="KYC? Not me!",
|
||||
subtitle="About KYCNOT.ME",
|
||||
support=donations))
|
||||
|
@ -165,6 +165,7 @@ async def gns(request):
|
|||
return text('POST request - {}'.format(request.json))
|
||||
return(html(template.render()))
|
||||
|
||||
'''
|
||||
async def generate_donations_qrcodes(donations):
|
||||
qr = qrcode.QRCode()
|
||||
qr.add_data(donations['xmr'])
|
||||
|
@ -184,6 +185,7 @@ async def generate_donations_qrcodes(donations):
|
|||
xmr.save("static/img/qrcodes/xmr.png")
|
||||
btc.save("static/img/qrcodes/btc.png")
|
||||
nano.save("static/img/qrcodes/nano.png")
|
||||
'''
|
||||
|
||||
async def get_trustpilot_info(service):
|
||||
r = httpx.get(
|
||||
|
|
|
@ -17,11 +17,8 @@ lazy-object-proxy==1.6.0
|
|||
MarkupSafe==2.0.1
|
||||
mccabe==0.6.1
|
||||
multidict==5.1.0
|
||||
petname==2.6
|
||||
Pillow==8.3.2
|
||||
pylint==2.8.3
|
||||
PyYAML==5.4.1
|
||||
qrcode==7.3
|
||||
rfc3986==1.5.0
|
||||
ruamel.appconfig==0.5.5
|
||||
ruamel.std.argparse==0.8.3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue