blob: 516b306e9bad6de84722536705d7205bf3663fc3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
from uuid import UUID
from os import environ
from pathlib import Path
host = '0.0.0.0'
port = 80
debug = True
pg_user = environ.get('POSTGRES_USER') or 'postgres'
pg_pass = environ.get('POSTGRES_PASSWORD') or ''
PG_URI = f'postgres://{pg_user}:{pg_pass}@pg'
APP_SECRET = UUID('8036587d-11ea-4c59-af9b-9da52eded1bc').bytes
NGX_IMAGE_PATH = Path('/var/ngx_img')
NGX_IMAGE_URL = Path('/ngx_img')
CUT_SIZES = {
's': (256, 256),
'm': (512, 512),
'l': (1024, 1024),
'xl': (2048, 2048)
# 'o': <original>
}
DELETE_FILE_ON_DELETE = False
NOT_FOUND_IMAGE_CONTENT_TYPE = 'image/jpeg'
with open('not-found.jpg', 'rb') as f:
NOT_FOUND_IMAGE = f.read()
|