-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.env.example
executable file
·93 lines (69 loc) · 2.26 KB
/
.env.example
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Custom model here
NSFW_MODEL_URL="https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz"
NSFW_MODEL_SHAPE_SIZE=224
# Set true to classify GIF (computationally expensive)
SUPPORT_GIF_CLASSIFICATION=true
# Use GPU
## not yet tested by MIT Researcher
GPU=true
# Logging
##Set to accelerate deforestation
LOG_PATH="logs"
##Set to know where your cache goes
CACHE_LOG=true
# Health Check
## for /health endpoint
TEST_URL="http://image/somewhere.png"
# Save hashed image
#Comment out to disable
CACHE_IMAGE_HASH_FILE=/tmp/hashed_image/
# Allowed Host - Server Side Forgery Something
##it will check BLOCKED_HOST if it found in the list, it will block the request
BLOCKED_HOST="localhost;127.0.0.1;::1"
##then check if ALLOW_ALL_HOST or is in ALLOWED_HOST if none of them is true then it will block the request
ALLOWED_HOST="cdn.discordapp.com;media.discordapp.net"
ALLOW_ALL_HOST=true
# PORT
PORT=5656
PORT_HTTPS=5657
# API Version
MAIN_VERSION=v3
# Certificate
#Options if you're using a valid cert
#keep commented to use current working directory certsFiles/
#recommended as standalone
CERT_PATH=/etc/letsencrypt/live/example.com/
# Optional Token Authentication
##Recommended Length 64 or more, put this on `Authorization` Header
NODE_NSFW_KEY="MY_TOKEN"
##Only for /health endpoint, put this on `x-health-token` header
#put `Authorization` Header with `NODE_NSFW_KEY` if you set it
NODE_HEALTH_AUTH="MY_TOKEN"
# CACHING
#Multi Layer Caching for freak
##comma separated value
##Default is InMemory
##Available: InMemory, File, Redis, Memcached
CACHE_TYPE=InMemory,File,Redis,Memcached
#In-Memory Cache
## Max Item in Cache
MAX_CACHE_SIZE=1000000
#File System
## Self Explanatory
FILE_CACHE_PATH=/tmp/nsfw_cache/
#Redis
#redis[s]://[[username][:password]@][host][:port][/db-number]
REDIS_URL=redis://alice:[email protected]:6380
#or
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=foobared
REDIS_DB=0
#cluster mode with configuration endpoint
REDIS_CLUSTER_CONFIGURATION_ENDPOINT=clusteruck.sj1zm9.clustercfg.use1.cache.amazonaws.com:6379
#note: DO NOT USE TRANSIT ENCRYPTION (it doesn't work, im too lazy to fix it)
#Memcached
MEMCACHED_HOST=localhost
MEMCACHED_PORT=11211
MEMCACHED_USERNAME=alice
MEMCACHED_PASSWORD=foobared