Hey friends, I have a django app deployed on a ubuntu VPS with Postgres, Nginx, and Gunicorn.
I need to make some updates to the app, specifically I'm aiming to set up user logins, so I want to be uploading inputted user data to my postgres DB, but I'm struggling to figure out how I can set this up for testing locally before making the changes in production.
I have already got the django app in a git repo and the idea of making changes locally in vsCode to the styling CSS or whatever and then going back to the VPS to pull the changes is a workflow that makes sense to me. But I'm struggling with how I can access a copy of the VPS's postgres DB locally to play around with, if that makes sense?
Happy to answer clarifying questions - I'm super new to this so apologies if I don't make much sense
What I've tried:
I've tried allowing my local IP to connect to the VPS datbase by editing the postgresql.conf file and pg_hba.conf files in the VPS, but I get connection refused errors and I'm not sure why at this stage - I'm thinking maybe it would be easier if I just had a local "copy" of the DB instead to test with