Forum OpenACS Development: Re: Docker Images available

Collapse
Posted by Kenneth Wyrick on
Hi Mate,
Used your .yml to install docker.

Trying to find the path to where the postgres data is stored.

The ENV is set to
PGDATA /var/lib/postgresql/data

kmw@caltek$ sudo docker run -it postgres:10-alpine /bin/bash
bash-5.0# whoami
root
bash-5.0# su - postgres
b030bcb67163:~$ psql -c "show data_directory"
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
b030bcb67163:~$
volume name: openacs_db_data
located:
/var/lib/docker/volumes/openacs_db_data/_data
Keep in mind that this finding depends on how docker is handling the volumes on your system. You should normally not access your volume directly from the docker host.
Hi, I'm tried this,

kmw@caltek$ sudo docker run -it postgres:10-alpine /bin/bash
bash-5.0# whoami
root
bash-5.0# su - postgres
b030bcb67163:~$ psql -c "show data_directory"
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
b030bcb67163:~$

but nothing happen here

Dear Binaca,

since nobody else answered so far: i have never used the docker image, so i have to do some guessing here. To me, this looks as if in the docker image, the postgres server was not started and/or it was not initialized (via initdb) yet.

https://wiki.postgresql.org/wiki/First_steps

i would expect that the docker script would do so for you, but maybe something went wrong on this...

-gn

Collapse
Posted by Malte Sussdorff on
Quick question. If you use the docker-compose.yml then both Postgres and Docker should come up and the OpenACS Database called „openacs“ with user „openacs“ should be initialized. The Root user might not have the access for your commands.

Not sure what you want to achieve though. The PGDATA is a volume, so you can store it within the docker environment and it stays with the same data even if you upgrade the Postgres Environment. This volume is „mounted“ within the Postgres container under /var/lib/postgresql/data. So depending on your *goal* I might actually help.