Add support for automatic (Postgres -> SQLite) migration to mx-puppet-steam

This commit is contained in:
Slavi Pantaleev
2020-12-22 16:51:59 +02:00
parent 262a25f997
commit 69cc2145d2
5 changed files with 67 additions and 58 deletions

View File

@ -56,18 +56,17 @@ matrix_mx_puppet_steam_homeserver_token: ''
matrix_mx_puppet_steam_login_shared_secret: ''
matrix_mx_puppet_steam_database_engine: sqlite
matrix_mx_puppet_steam_sqlite_database_path_local: "{{ matrix_mx_puppet_steam_data_path }}/database.db"
matrix_mx_puppet_steam_sqlite_database_path_in_container: "/data/database.db"
matrix_mx_puppet_steam_database_username: matrix_mx_puppet_steam
matrix_mx_puppet_steam_database_password: ~
matrix_mx_puppet_steam_database_hostname: 'matrix-postgres'
matrix_mx_puppet_steam_database_port: 5432
matrix_mx_puppet_steam_database_name: matrix_mx_puppet_steam
matrix_mx_puppet_steam_database_file: /data/database.db
matrix_mx_puppet_steam_database_connString: >-2
{%- if matrix_mx_puppet_steam_database_engine == 'postgres' -%}
postgresql://{{ matrix_mx_puppet_steam_database_username }}:{{ matrix_mx_puppet_steam_database_password }}@{{ matrix_mx_puppet_steam_database_hostname }}:{{ matrix_mx_puppet_steam_database_port }}/{{ matrix_mx_puppet_steam_database_name }}?sslmode=disable
{%- elif matrix_mx_puppet_steam_database_engine == 'sqlite' -%}
{{ matrix_mx_puppet_steam_database_engine }}://{{ matrix_mx_puppet_steam_database_file }}
{%- endif -%}
matrix_mx_puppet_steam_database_db_name: matrix_mx_puppet_steam
matrix_mx_puppet_steam_database_connection_string: 'postgresql://{{ matrix_mx_puppet_steam_database_username }}:{{ matrix_mx_puppet_steam_database_password }}@{{ matrix_mx_puppet_steam_database_hostname }}:{{ matrix_mx_puppet_steam_database_port }}/{{ matrix_mx_puppet_steam_database_db_name }}?sslmode=disable'
# Default configuration template which covers the generic use case.
# You can customize it by controlling the various variables inside it.