-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall.bat
52 lines (41 loc) · 1.07 KB
/
install.bat
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
@echo off
:: Check if Python is installed
where python >nul
if errorlevel 1 (
echo Python is not installed. Please install it before proceeding.
exit /b
)
:: Create virtual environment
echo Creating virtual environment...
python -m venv env
:: Activate virtual environment
echo Activating virtual environment...
call env\Scripts\activate
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip
:: Install requirements
echo Installing dependencies...
pip install -r requirements.txt
:: Create the 'data' and 'media' directory
echo "Creating data, backup and media directory"
mkdir data
mkdir backups
mkdir media
:: Run migrations
echo Running migrations...
python manage.py migrate
python manage.py makemigrations api
python manage.py migrate
:: Collect static
echo Collect statis files...
python manage.py collectstatic
# Start the scheduler
echo "Starting scheduler..."
python manage.py scheduler
# Create Superuser
echo "Creating superuser..."
python manage.py createsuperuser
:: Start the development server
echo Starting the server...
python manage.py runserver