Fixes https://github.com/emqx/emqx/issues/9907 At v5.0.14, we changed the `ssl` option for the Postgres connector from `true` to `required`, but there was another transformation in `conn_opts/2` that led to an incorrect configuration. This change ended up preventing users from connecting to Postgres with their previous configurations after upgrading EMQX.
13 lines
570 B
Docker
13 lines
570 B
Docker
ARG BUILD_FROM=postgres:13
|
|
FROM ${BUILD_FROM}
|
|
ARG POSTGRES_USER=postgres
|
|
COPY --chown=$POSTGRES_USER ./pgsql/pg_hba_tls.conf /var/lib/postgresql/pg_hba.conf
|
|
COPY --chown=$POSTGRES_USER certs/server.key /var/lib/postgresql/server.key
|
|
COPY --chown=$POSTGRES_USER certs/server.crt /var/lib/postgresql/server.crt
|
|
COPY --chown=$POSTGRES_USER certs/ca.crt /var/lib/postgresql/root.crt
|
|
RUN chmod 600 /var/lib/postgresql/pg_hba.conf
|
|
RUN chmod 600 /var/lib/postgresql/server.key
|
|
RUN chmod 600 /var/lib/postgresql/server.crt
|
|
RUN chmod 600 /var/lib/postgresql/root.crt
|
|
EXPOSE 5432
|