Support Postgres 10

* Add SYMFONY__ENV__DATABASE_DRIVER_CLASS environment variable which can
  be set to the necessary driver class for Postgres 10
* Use this in travis.yml
This commit is contained in:
Robin Green
2018-03-10 21:52:21 +00:00
parent eeead4ff44
commit a37317f55f
4 changed files with 7 additions and 3 deletions

View File

@ -5,6 +5,7 @@
vars:
database_driver: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER')|default('pdo_sqlite', true) }}"
database_driver_class: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER_CLASS')|default('~', true) }}"
database_host: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_HOST')|default('127.0.0.1', true) }}"
database_name: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_NAME')|default('symfony', true) }}"
database_password: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PASSWORD')|default('~', true) }}"
@ -116,6 +117,7 @@
postgresql_user:
name="{{ database_user }}"
password="{{ database_password }}"
encrypted=true
db={{ database_name }}
priv=ALL
login_host="{{ database_host }}"

View File

@ -1,5 +1,6 @@
parameters:
database_driver: {{ database_driver }}
database_driver_class: {{ database_driver_class }}
database_host: {{ database_host }}
database_port: {{ database_port }}
database_name: {{ database_name }}
@ -9,7 +10,6 @@ parameters:
database_table_prefix: wallabag_
database_socket: null
database_charset: {{ database_charset }}
database_driver_class: null
domain_name: {{ domain_name }}