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,22 @@ 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 "SECRET_KEY = '$(python3 -c "from django.core.management.utils import get_random_secret_key as g; print(g())")'" > pytition/pytition/settings/config.py
25+ cat <<EOT >> pytition/pytition/settings/config.py
26+ DATABASES = {
27+ 'default': {
28+ 'ENGINE': 'django.db.backends.mysql',
29+ 'OPTIONS': {
30+ 'read_default_file': '$PWD/my.cnf',
31+ 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
32+ },
33+ }
34+ }
35+ EOT
2336
24- sed -i -e "s@/home/petition/www/@$PWD/@" pytition/pytition/ settings/base.py
37+ export DJANGO_SETTINGS_MODULE= pytition. settings.config
2538
2639echo "Running database migrations"
2740
You can’t perform that action at this time.
0 commit comments