-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.py.example
98 lines (77 loc) · 3.11 KB
/
config.py.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
94
95
96
import os
# --------------------------------------------------
# -------------------------------------------------- COMMON
# --------------------------------------------------
SERVER_HOST = "0.0.0.0"
SERVER_POST = 8000
# Define the application directory
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
# Statement for enabling the development environment
DEBUG = True
SECRET_KEY = os.urandom(30)
# Upload destination setting
UPLOAD_BASE_DIR = "/storage/"
#
# # This must be located under UPLOAD_BASE_DIR and must not starts with slash.
UPLOAD_DIRECTORY = "depot"
# --------------------------------------------------
# -------------------------------------------------- DATABASE
# --------------------------------------------------
# The database URI that should be used for the connection.
# Example: SQLALCHEMY_DATABASE_URI = "dialect+driver://username:password@host:port/database"
# For further information,
# See http://pythonhosted.org//Flask-SQLAlchemy/config.html#connection-uri-format
# Default value is sqlite:////current/directory/depot.db
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, 'depot.db')
# SQLALCHEMY_ECHO = True
############################################################################
##### ENSURE THIS VARIABLE IS SET TO FALSE AFTER CREATING NEEDED USERS #####
############################################################################
ENABLE_SIGNUP = True
# --------------------------------------------------
# -------------------------------------------------- API
# --------------------------------------------------
# Option for API functions for third-party client.
## Default value is True
ENABLE_API = True
# ----
# ---- REMOTE BROWSER
# ----
# Option for remote browser.
# Set to False if you don't want uploader to browse your local directories.
# Browser API only returns directories and files in UPLOAD_BASE_DIR.
### Default value is False
ENABLE_REMOTE_BROWSER = False
# ----
# ---- ZIP
# ----
# Option for group zipping.
# Compression might slow down your server; set ENABLE_ZIP to False to disable
# zipping feature or set ZIP_METHOD to zipfile.ZIP_STORED to just
# gather - not compressing - files into one zip file.
### Default values are:
##### ENABLE_ZIP = False
##### ZIP_METHOD = zipfile.ZIP_DEFLATED
import zipfile
ENABLE_ZIP = False
# ZIP_STORED or ZIP_DEFLATED
ZIP_METHOD = zipfile.ZIP_DEFLATED
# --------------------------------------------------
# -------------------------------------------------- TRANSPORT METHOD
# --------------------------------------------------
# RECOMMENDED: Set to True if you usually deal with large files.
# XSendFile allows application to serve files more efficiently by
# sending only path to httpd, then httpd reads directly from the given path and
# sends it to client.
HTTPD_USE_X_SENDFILE = False
HTTPD_TYPE = "nginx"
# Set base directory if you use nginx for proxy.
HTTPD_BASE_DIR = "/"
# --------------------------------------------------
# -------------------------------------------------- ADD-ON
# --------------------------------------------------
# ----
# ---- GEOIP
# ----
ENABLE_GEOIP = False
GEOIP_DATABASE_PATH = "/path/to/geoip2/database"