-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathinstall.sh
30 lines (21 loc) · 798 Bytes
/
install.sh
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
#!/bin/bash
pip install -U pip
pip install poetry
poetry install
SECRET_KEY=$(python -c "import secrets; print(secrets.token_hex(25))")
read -p "Enter Telegram bot API-token: " TELEGRAM_BOT_TOKEN
read -p "Enter PostgreSQL database name: " POSTGRESQL_DATABASE_NAME
read -p "Enter PostgreSQL database user: " POSTGRESQL_DATABASE_USER
read -p "Enter PostgreSQL database password: " POSTGRESQL_DATABASE_PASSWORD
cat << EOF > .env
SECRET_KEY=$SECRET_KEY
DEBUG=True
ENABLE_TELEGRAM_AUTH=False
TELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN
FRONTEND_PATH=$PWD/frontend/dist
POSTGRESQL_DATABASE_NAME=$POSTGRESQL_DATABASE_NAME
POSTGRESQL_DATABASE_USER=$POSTGRESQL_DATABASE_USER
POSTGRESQL_DATABASE_PASSWORD=$POSTGRESQL_DATABASE_PASSWORD
EOF
python manage.py compilemessages -i env
python manage.py migrate