diff --git a/deploy/compose/compose.yaml b/deploy/compose/compose.yaml index d32f4e8..685b96b 100644 --- a/deploy/compose/compose.yaml +++ b/deploy/compose/compose.yaml @@ -1,9 +1,14 @@ services: postgresql: image: docker.io/postgres:18-alpine + command: + - -c + - config_file=/etc/postgresql/postgresql.conf configs: - source: postgresql_config target: /etc/postgresql/postgresql.conf + - source: postgresql_hba_config + target: /etc/postgresql/pg_hba.conf env_file: - path: ./infrastructure/configs/postgresql/.env.template required: true @@ -138,5 +143,7 @@ volumes: configs: postgresql_config: file: ./infrastructure/configs/postgresql/postgresql.conf + postgresql_hba_config: + file: ./infrastructure/configs/postgresql/pg_hba.conf valkey_config: file: ./infrastructure/configs/valkey/valkey.conf diff --git a/infrastructure/configs/postgresql/pg_hba.conf b/infrastructure/configs/postgresql/pg_hba.conf new file mode 100644 index 0000000..008eb9a --- /dev/null +++ b/infrastructure/configs/postgresql/pg_hba.conf @@ -0,0 +1,2 @@ +host all all 0.0.0.0/0 scram-sha-256 +host all all ::/0 scram-sha-256 diff --git a/infrastructure/configs/postgresql/postgresql.conf b/infrastructure/configs/postgresql/postgresql.conf index c4f92fc..d3e5b61 100644 --- a/infrastructure/configs/postgresql/postgresql.conf +++ b/infrastructure/configs/postgresql/postgresql.conf @@ -41,7 +41,7 @@ #data_directory = 'ConfigDir' # use data in another directory # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file +hba_file = '/etc/postgresql/pg_hba.conf' # host-based authentication file # (change requires restart) #ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file # (change requires restart) @@ -57,12 +57,12 @@ # - Connection Settings - -#listen_addresses = 'localhost' # what IP address(es) to listen on; +listen_addresses = '*' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost'; use '*' for all # (change requires restart) #port = 5432 # (change requires restart) -#max_connections = 100 # (change requires restart) +max_connections = 400 # (change requires restart) #reserved_connections = 0 # (change requires restart) #superuser_reserved_connections = 3 # (change requires restart) #unix_socket_directories = '/tmp' # comma-separated list of directories