ソースを参照

add gunicorn and redy for server

Evgeny Polivanov 1 年間 前
コミット
1684667dd0
1 ファイル変更36 行追加10 行削除
  1. 36 10
      README.md

+ 36 - 10
README.md

@@ -5,22 +5,48 @@ Admin system implemented as a Django application.
 ## How install?
 
 1) Download or clone repository
-
 ```bash
 git clone http://git.sharix-app.org/ShariX_Open/sharix-open-webapp-base.git name_project
 ```
+2) Set up a configuration file ```nano core/config_template.py```
+```python
+#Create file config.py with this setting or rename this file to config.py
 
-2) Install with install_win.bat (for Windows) or install_linux.sh (for Linux)
+#BASE
+DEBUG=True
+SECRET_KEY='secret-key(absolutely any character)'
+ALLOWED_HOSTS = ['127.0.0.1']
+CSRF_TRUSTED_ORIGINS = []
 
-If the installation is successful, the system will prompt you to create a superuser
-1. Enter your phone number (required field)
-2. Username (required field)
-3. Email (optional)
-4. Password (required field)
-5. Repeat password (required field)
-6. y - to agree if the password is too simple
+#DATABSE
+DB_NAME=None
+DB_USER=None
+DB_PASSWORD=None
+DB_HOST=None
 
-3) To manually install the project, open the .bat file with a text editor and try these commands in the terminal
+#GUNICORN
+BIND = "127.0.0.1:8000"
+WORKERS = 2
+THREADS = 4
+
+#STATIC
+from pathlib import Path
+import os
+BASE_DIR = Path(__file__).resolve().parent.parent
+STATIC_URL = '/static/'
+STATICFILES_DIRS = [BASE_DIR / "SharixAdmin/static/", BASE_DIR / "tickets/static/"]
+STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
+```
+3) Run a **install_win.bat**
+4) The system will prompt you to create a superuser
+```
+#Example
+7987654321
+admin
+pa$$w0rd
+pa$$w0rd
+```
+### Ready!
 
 ## Server instalation
 1) Download or clone repository