Hey there
Situation: I want to set up two Postgres DB in docker-compose with different ports (for two applications).
I write some .yml:
services:
db1:
image: some_image
volumes:
- ./configs/postgresql_1.conf:/etc/postgresql/postgresql_1.conf
command: postgres -c config_file=/etc/postgresql/postgresql_1.conf
db2:
image: some_image
volumes:
- ./configs/postgresql_2.conf:/etc/postgresql/postgresql_2.conf
command: postgres -c config_file=/etc/postgresql/postgresql_2.conf
My config file has two string:
postgresql_1.conf:
listen_adress = ālocalhostā
port = 15432
postgresql_2.conf:
listen_adress = ālocalhostā
port = 5432
And when I start command docker-compose up db1 I see this error:
LOG: input in flex scanner failed at file "/etc/postgresql/postgresql_1.conf" line 1
FATAL: configuration file "/etc/postgresql/postgresql_1.conf" contains errors
Please, tell me, how can I fix it?