WormBase / caltech-curation-services

Modular curation services for Caltech WormBase data
1 stars 0 forks source link

add pg_dump to curation docker image #33

Closed valearna closed 1 year ago

valearna commented 1 year ago

@azurebrd pg_dump and psql installed on the curation docker image and added a new perl module installer to speed up docker image build process

azurebrd commented 1 year ago

Hi @valearna . I see that pg_dump is installed, and I can which + man it, but if I try to use it pg_dump caltech_curation > blah.pg pg_dump: [archiver (db)] connection to database "caltech_curation" failed: 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"?

In the .env
PSQL_PORT=5432 PSQL_DATABASE=caltech_curation I'm using the variable for the psql_database, and if the psql_port is ever different, I'm not sure what the syntax would be, but that's not the problem right now

Edit : from inside docker as root from directory /usr/caltech_curation_files/cronjobs/pgdumps/

azurebrd commented 1 year ago

/usr/bin/pg_dump -h curation_db -U postgres caltech_curation > blah.pg
pg_dump: server version: 13.10 (Debian 13.10-1.pgdg110+1); pg_dump version: 11.19 (Debian 11.19-0+deb10u1) pg_dump: aborting because of server version mismatch

valearna commented 1 year ago

Fixed by changing postgres version of the main DB from 13 to 11, which is the version installed on the curation docker image. @azurebrd you'll need to remove the db volume (or run docker-compose down -v to remove all containers and volumes), restart the db container (docker-compose up -d db) and reload the db from a dump to restart the DB

azurebrd commented 1 year ago

Thanks @valearna ! Something didn't quite work, and I'm not sure what to do about it

docker-compose down -v
WARNING: The DISPLAY variable is not set. Defaulting to a blank string. Stopping caltech-curation-services-juancarlos_curation_1 ... done Removing caltech-curation-services-juancarlos_curation_1 ... done Removing network caltech-curation-network ERROR: error while removing network: network caltech-curation-network id c3d0dfa71617e588fa868f4214fc008fea7bc436a36275427c87601521019a8f has active endpoints

I'm not sure if that's supposed to go down or not

valearna commented 1 year ago

It's probably because I have other docker containers outside your .env specific configuration running. I stopped everything and now you should be able to rebuild and restart your containers

azurebrd commented 1 year ago

Great, thanks @valearna, it's working !
Also, I remembered we were originally planning to meet Monday to test why dockerized was slower than tazendra for mapping author names to person names. We can just meet and decide what's worth talking about though