-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartserver.bat
More file actions
50 lines (46 loc) · 1.61 KB
/
startserver.bat
File metadata and controls
50 lines (46 loc) · 1.61 KB
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
@echo off
echo PACKAGES WILL BE INSTALLED. THIS MAY BREAK YOUR EXISTING TOOLCHAIN.
echo YOU ACCEPT ALL RESPONSIBILITY BY PROCEEDING.
set /p "yn=Proceed? [Y/n] : "
if /I "%yn%"=="Y" (
call :install
)
goto :EOF
:install
python -m pip install --upgrade pip
pip show django || pip install django
pip show djangorestframework || pip install djangorestframework
pip show djangorestframework-jwt || pip install djangorestframework-jwt
pip show djangorestframework-simplejwt || pip install djangorestframework-simplejwt
pip show djongo || pip install djongo
pip show celery || pip install celery
pip show crontab || pip install crontab
pip show django-crontab || pip install django-crontab
pip show django-cors-headers || pip install django-cors-headers
pip show channels==3.0.4 || pip install channels==3.0.4
pip show channels_redis==3.3.1 || pip install channels_redis==3.3.1
pip show elasticsearch || pip install elasticsearch
pip show django-elasticsearch-dsl || pip install django-elasticsearch-dsl
pip show minio || pip install minio
pip show django-storages boto3 || pip install django-storages boto3
:: server
python manage.py makemigrations
python manage.py migrate
set res=%errorlevel%
:check_res
if %res% neq 0 (
timeout /t 3
python manage.py migrate
set res=%errorlevel%
if %res% neq 0 goto check_res
)
echo STARTING COLTEAM SERVER
start "Colteam Server" /B python manage.py runserver 0.0.0.0:8000
:: redis
cd redis_windows
echo STARTING REDIS SERVER
start "Run Redis Server" /B redis-server.exe redis.windows.conf
:: celery
cd ..
echo STARTING CELERY TASKS
start "Celery Tasks" /B celery -A colteam worker --loglevel=info