Open samschlicht opened 18 hours ago
(Starts from after the docker-compose section of readme, which is all good)
Verify that Docker is up and running, incl. containerised Postgres:
docker ps
Verify that tctalent is up and running within that container:
docker exec -it docker-compose-postgres-1 psql -U tctalent -d tctalent
should open the psql console — /q
to exit the psql console at any time.
For existing dev
Make a dump of the containerised DB:
docker exec -it docker-compose-postgres-1 pg_dump --file=/tmp/dump.sql --create --username=tctalent --host=localhost --port=5432
Copy the file from the docker container to local system:
docker cp docker-compose-postgres-1:/tmp/tcdump.sql </path/to/file>
Send to new dev
New dev
Copy the DB dump from your local system to your docker container:
docker cp <path/to/file> docker-compose-postgres-1:/tmp/dump.sql
Populate the docker DB from the dump:
docker exec -it docker-compose-postgres-1 psql -U tctalent -d tctalent -f /tmp/dump.sql
Connect IntelliJ to the docker DB: Database > New > Data Source > PostgreSQL
Optional: for existing devs to understand that they no longer need to have postgres installed locally
brew uninstall postgresql
Currently our readme instructs to run containerised postgresql using docker-compose, but then departs to give instructions to install locally (which is not needed), verify that it is installed locally, and populate the local DB.
Suggest we change the local instructions to docker ones and also perhaps a brief description how to connect IntelliJ.