So I was following https://github.com/debiki/talkyard-prod-one and when starting my rdb container dies with:
rdb_1 | 2021-03-11 18:56:34.606 GMT  LOG: could not open configuration file "/var/lib/postgresql/conf/postgresql.conf": No such file or directory rdb_1 | 2021-03-11 18:56:34.607 GMT  FATAL: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors
much to my surprise the file does not exist within the container
root@blog:/opt/talkyard# docker-compose run --rm rdb /bin/bash bash-4.4# ls /var/lib/postgresql/conf/postgresql.conf ls: /var/lib/postgresql/conf/postgresql.conf: No such file or directory
I think that you wanted to include /var/lib/postgresql/data/postgresql.conf.orig instead of /var/lib/postgresql/conf/postgresql.conf
- 4 replies
- KajMagnus @KajMagnus2021-03-12 04:11:14.205Z2021-03-12 04:25:33.082Z
Oh I didn't push some changes in
masterGit branch yet. I'll have a look and then I'll push to master.
If you don't want to wait: There's another branch, in the
talkyard-prod-onerepo that you can use instead:
w-km2. "w" here means "work in progress" and "km" means "kajmagnus", that is, my work in progress branch number 2.
There wil be another change included too — namely auto HTTPS certs via a Lua plugin (so you won't need to generate any cert manually via
certbot, although you can do that instead, should you want to).
The purpose with this change, was to make it simpler to edit & backup the PostgreSQL configuration (In particular, log levels) by keeping the config in the
/opt/talkyard/conf/directory on the host (where it gets included in the daily backups).
Previously, thew whole config file was in
/var/lib/postgresql/data/postgresql.confin the container, but in February I changed it to just this:
(for new installations only, won't affect already existing installations),
meaning, the config is now instead supposed to be in
/var/lib/postgresql/conf/postgresql.conf— in the container, ...
... On the host, the Postgresql config is supposed to be in:
/opt/talkyard/conf/rdb/which then gets mounted in
/var/lib/postgresql/conf/in the container. And this is the change I forgot to push to master.
(Sorry for the troubles; thanks for posting about this.)
FYI: I tried these steps and they worked except I believe there is an error in the
As a result, I had to comment out
set -eto get it to run.
- In reply tomzafkismugi⬆:KajMagnus @KajMagnus2021-04-10 05:20:08.594Z
Status update: I've merged the
w-km2changes into in the main branch in
talkyard-prod-one(two? weeks ago actually, I forgot to mention here, sorry).
And updated the instructions so one installs Ubuntu 20.04 (instead of 18.04), and Docker 20.x instead of 19.x.
So this should have been solved now.ReplySolution