File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,9 +19,23 @@ password = pytition
1919default-character-set = utf8
2020ENDOFFILE
2121
22- echo "Updating settings to use your my.cnf"
22+ echo "Generating a basic config file"
23+
24+ echo "from .base import *" > pytition/pytition/settings/config.py
25+ echo "SECRET_KEY = '$(python3 -c "from django.core.management.utils import get_random_secret_key as g; print(g())")'" >> pytition/pytition/settings/config.py
26+ cat <<EOT >> pytition/pytition/settings/config.py
27+ DATABASES = {
28+ 'default': {
29+ 'ENGINE': 'django.db.backends.mysql',
30+ 'OPTIONS': {
31+ 'read_default_file': '$PWD/my.cnf',
32+ 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
33+ },
34+ }
35+ }
36+ EOT
2337
24- sed -i -e "s@/home/petition/www/@$PWD/@" pytition/pytition/ settings/base.py
38+ export DJANGO_SETTINGS_MODULE= pytition. settings.config
2539
2640echo "Running database migrations"
2741
You can’t perform that action at this time.
0 commit comments