Merge pull request #25 from wulkanowy/enhancementautomatic_installation
Automatic installation
This commit is contained in:
commit
2fbc078be5
5 changed files with 78 additions and 39 deletions
|
@ -1 +1 @@
|
|||
SECRET_KEY = YOUR_SECRET_KEY_HERE
|
||||
SECRET_KEY = VULCANWEBKEY
|
||||
|
|
15
README.md
15
README.md
|
@ -5,6 +5,17 @@
|
|||
[![Discord](https://img.shields.io/discord/390889354199040011.svg?color=#33CD56)](https://discord.gg/vccAQBr)
|
||||
|
||||
# Development
|
||||
## 0. Automatic installation (WINDOWS ONLY)
|
||||
If you don't want to enter commands just run
|
||||
```shell
|
||||
install.exe
|
||||
```
|
||||
If that doesn't work, run the file:
|
||||
```shell
|
||||
install.bat
|
||||
```
|
||||
Which is in the batch folder
|
||||
After this installation, just follow the 3rd step
|
||||
## 1. Install dependencies.
|
||||
```shell
|
||||
pip install -r requirements.txt
|
||||
|
@ -16,15 +27,13 @@ npm install
|
|||
## 2. Create .env and make migrations
|
||||
In the .env file put the code:
|
||||
```shell
|
||||
SECRET_KEY = writeanythinghere
|
||||
SECRET_KEY = VULCANWEBKEY
|
||||
```
|
||||
After saving the files, we migrate with these commands:
|
||||
```shell
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
```
|
||||
and modify the .envsample file as you would the .env file
|
||||
THE SECRET KEY MUST BE THE SAME
|
||||
## 3. Start the server!
|
||||
```shell
|
||||
npm run dev
|
||||
|
|
30
batch/install.bat
Normal file
30
batch/install.bat
Normal file
|
@ -0,0 +1,30 @@
|
|||
::To jest to samo co w pliku install.exe
|
||||
pip install -r requirements.txt
|
||||
echo SECRET_KEY = VULCANWEBKEY > .env
|
||||
::Kiedyś to SECRET_KEY będzie generowany przez skrypt NIE RUSZAĆ!!!
|
||||
::setLocal EnableDelayedExpansion
|
||||
::set str=ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
|
||||
::set /a P=!random!%%36
|
||||
::set znak1=!str:~%P%,1!
|
||||
::set /a P=!random!%%36
|
||||
::set znak2=!str:~%P%,1!
|
||||
::set /a P=!random!%%36
|
||||
::set znak3=!str:~%P%,1!
|
||||
::set /a P=!random!%%36
|
||||
::set znak4=!str:~%P%,1!
|
||||
::set /a P=!random!%%36
|
||||
::set znak5=!str:~%P%,1!
|
||||
::set /a P=!random!%%36
|
||||
::set znak6=!str:~%P%,1!
|
||||
::set /a P=!random!%%36
|
||||
::set znak7=!str:~%P%,1!
|
||||
::set /a P=!random!%%36
|
||||
::set znak8=!str:~%P%,1!
|
||||
::set /a P=!random!%%36
|
||||
::set znak9=!str:~%P%,1!
|
||||
::set "key=%znak1%%znak2%%znak3%%znak4%%znak5%%znak6%%znak7%%znak8%%znak9%"
|
||||
::echo SECRET_KEY = %key% > .env
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
npm install
|
||||
pause
|
BIN
install.exe
Normal file
BIN
install.exe
Normal file
Binary file not shown.
Loading…
Reference in a new issue