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 [1] 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 [1] 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
- KajMagnus @KajMagnus2021-03-12 04:11:14.205Z2021-03-12 04:25:33.082Z
Oh I didn't push some changes in
talkyard-prod-one
to themaster
Git 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-one
repo 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).Details:
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.conf
in the container, but in February I changed it to just this:include '/var/lib/postgresql/conf/postgresql.conf'
,
(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.)
- ZZoubin Irani @zoubinirani
FYI: I tried these steps and they worked except I believe there is an error in the
upgrade-if-needed.sh
script.As a result, I had to comment out
set -e
to get it to run.https://github.com/debiki/talkyard-prod-one/blob/w-km2/scripts/upgrade-if-needed.sh
- KajMagnus @KajMagnus2021-03-17 05:43:11.056Z
What's the error? Thanks for mentioning
- In reply tomzafkismugi⬆:KajMagnus @KajMagnus2021-04-10 05:20:08.594Z
Status update: I've merged the
w-km2
changes into in the main branch intalkyard-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.