Hi
> Does anyone know how to switch the database in openshift from sqllite to
> mysql?
>
> I installed the mysql cartridge, and it is up and running, but beyond
> that IDK
The OpenShift support for Weblate currently doesn't include automatic
configuration for databases other than SQLite. However you can switch to
MySQL by executing the following commands on the command line, provided
that you already added the MySQL cartridge:
$ rhc -aweblate ssh 'app-root/repo/openshift/manage.py dumpdata
>/tmp/dump.json'
$ rhc -aweblate env set WEBLATE_DATABASES='{ "default": { "ENGINE":
"django.db.backends.mysql", "NAME": "${OPENSHIFT_APP_NAME}", "USER":
"${OPENSHIFT_MYSQL_DB_USERNAME}", "PASSWORD":
"${OPENSHIFT_MYSQL_DB_PASSWORD}", "HOST": "${OPENSHIFT_MYSQL_DB_HOST}",
"PORT": "${OPENSHIFT_MYSQL_DB_PORT}", } }'
$ rhc -aweblate ssh 'app-root/repo/openshift/manage.py syncdb'
$ rhc -aweblate ssh 'app-root/repo/openshift/manage.py loaddata
/tmp/dump.json'
$ rhc -aweblate app stop
$ rhc -aweblate app start
Change the -a argument if your app isn't named weblate. I also put them
into a GitHub Gist for easier copying:
<https://gist.github.com/dtschan/390e268d0dd9f0222077>
You can verify that you run on MySQL by visiting /admin/performance on
your Weblate instance. If you run with SQLite there will be a red icon
with a dash besides "Database backend", otherwise there will be a green
icon with a tick.
Kind regards
Daniel
_______________________________________________
Weblate mailing list
[email protected]
https://lists.cihar.com/cgi-bin/mailman/listinfo/weblate