-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.env
110 lines (94 loc) · 3.45 KB
/
sample.env
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
###
# 各種シークレットキーの設定
###
# Django Master
## 5種類以上の文字 and 50文字以上
## 生成コード
## import django
## django.core.management.utils.get_random_secret_key()
DJANGO_SECRET_KEY='***YOUR_DJANGO_SECRET_KEY***'
# security.Encryption
## FIELD_ENCRYPTION_KEYS, ENCRYPTION_HASH_KEY: 16進数(0-9a-f) 32バイト(64文字)
## 生成コード
## import secrets
## hex_string = secrets.token_bytes(32).hex()
FIELD_ENCRYPTION_KEYS_01='***YOUR_FIELD_ENCRYPTION_KEYS***'
ENCRYPTION_HASH_KEY='***YOUR_ENCRYPTION_HASH_KEY***'
###
# サイト情報
###
# FrontendURL 最後 / 入れないこと
FRONTEND_URL='*** YOUR DEPLOY FRONT END URL ***'
###
# その他セキュリティ対策
###
# ALLOWED_HOSTS
# https://qiita.com/hobbypro/items/dac26ce063a938d32b36
ALLOWED_HOSTS_DEBUG='*'
ALLOWED_HOSTS_01='*** YOUR DEPLOY HOST ***'
# admin_protect.AdminProtectSetting
# ALLOWED_IP_ADMIN: (, 区切りで複数指定可能. スペース開けないこと)
ADMIN_PATH='admin'
ALLOWED_IP_ADMIN='0.0.0.0,255.255.255.255'
# security.AccessSecurityMiddleware
ACCESS_COUNT_SECONDS_TIME=30
N_TIMES_TO_BLOCK_ACCESS=120
N_TIMES_TO_ADD_BLOCKLIST=300
BLOCKLIST_EFFECTIVE_DAYS=30
REGISTERED_BLOCK_IP_LIST_READ_FREC=60
# security.DjangoAxes
AXES_FAILURE_LIMIT=5
AXES_COOLOFF_TIME=0.5
AXES_ONLY_USER_FAILURES=True
AXES_RESET_ON_SUCCESS=True
# security.rePATCHA
# https://www.google.com/recaptcha/admin
RECAPTCHA_PUBLIC_KEY='*** YOUR RECAPTCHA_PUBLIC_KEY ***'
RECAPTCHA_PRIVATE_KEY='*** YOUR RECAPTCHA_PRIVATE_KEY ***'
# extra_settings.EmailBackend
# , 区切りで複数指定可能. スペース開けないこと
IS_ADMIN_NOTICE=True
ADMIN_EMAIL_LIST='*** YOUR MAIL ADDRESS (ex.admin@debug.debug) ***'
EMAIL_PORT='*** YOUR MAIL EMAIL_PORT ***'
EMAIL_USE_TLS=True
DEFAULT_FROM_EMAIL='*** YOUR GMAIL ADDRESS(@gmail.com) ***'
DEFAULT_REPLY_EMAIL='*** YOUR GMAIL ADDRESS(@gmail.com) ***'
EMAIL_HOST_USER='*** YOUR GMAIL ADDRESS(@gmail.com) ***'
EMAIL_HOST_PASSWORD='*** YOUR SOCIAL_AUTH_GOOGLE_OAUTH2_KEY ***'
# extra_settings.LoginSessionAge
SESSION_COOKIE_AGE=3600
SESSION_COOKIE_SET_EXPIRY_AGE=86400
SESSION_EXPIRE_AT_BROWSER_CLOSE=True
# extra_settings.SocialLogin
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY='*** YOUR SOCIAL_AUTH_GOOGLE_OAUTH2_KEY ***'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET='*** YOUR SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET ***'
# extra_settings.TokenAge
PASSWORD_RESET_TOKEN_AGE=300
EMAIL_CERTIFICATION_TOKEN_AGE=300
###
# GCP用
###
# extra_settings.Database extra_settings.StaticMediaFiles
# DB_SQL_NAME: 小文字英数字とアンダースコアだけ使う。 大文字は避ける。
GCP_PROJECT_ID='*** YOUR DB_SQL_LOCALGS_PROJECT_ID_PORT ***'
PROXY_PRIVATE_IP='0.0.0.0'
PROXY_PORT='1234'
# Cloud SQL
# CONNECTION_NAME or DB_SQL_PRIVATE_IP で接続
DB_SQL_DB_NAME='*** YOUR DB_SQL_DB_NAME ***'
DB_SQL_USER_NAME='*** YOUR DB_SQL_USER_NAME ***'
DB_SQL_USER_PASSWORD_GCP='*** YOUR DB_SQL_USER_PASSWORD_GCP ***'
DB_SQL_CONNECTION_NAME='*** YOUR DB_SQL_CONNECTION_NAME ***'
DB_SQL_PRIVATE_IP='*** YOUR DB_SQL_PRIVATE_IP ***'
DB_SQL_PUBLIC_IP='*** YOUR DB_SQL_PUBLIC_IP ***'
DB_SQL_LOCAL_PORT='*** YOUR DB_SQL_LOCAL_PORT ***'
# Cloud Strage
GS_CREDENTIALS_JSON='*** YOUR GS_CREDENTIALS_JSON .json ***'
GS_BUCKET_NAME='*** YOUR GS_BUCKET_NAME ***'
###
# OpenAI
###
OPENAI_API_KEY='*** YOUR OPENAI_API_KEY ***'
AZURE_OPENAI_ENDPOINT=''
AZURE_OPENAI_API_VERSION=''
AZURE_OPENAI_DEFAULT_MODEL_NAME=''