Giter VIP home page Giter VIP logo

Comments (1)

MattTriano avatar MattTriano commented on May 29, 2024

To add the pgRouting extension to the PostGIS (dwh_db) container, I'll have to:

  • swap in the official PostGIS Dockerfile and initdb-postgis.sh script,
  • edit the initdb-postgis.sh script (adding a line CREATE EXTENSION IF NOT EXIST pgrouting; to the list of extension installs),
  • put the initdb-postgis.sh somewhere logical in the local build and update the path in the new Dockerfile (and the context in the docker-compose.yml if needed), and
  • rebuild and test.

The initdb script only runs if the database doesn't exist, but my local database exists and has months of data in it. I could just

  1. get a shell in the PostGIS dwh_db container,
  2. use psql to install the extension into my local setup, then
  3. go through the above steps and hope that prod behaves the same as dev,

but I don't want to go that route as I want to minimize the differences between the system I develop on and prod. So I should implement a more automated way to backup databases [than 1) adding a mount point to the docker-compose.yml, 2) getting a shell in the PostGIS dwh_db container, 3) running pg_dumpall -c -U $POSTGRES_USER -d $POSTGRES_DB > db_backup_$(date +"%Y_%m_%d__%H%M"), and 4) moving that backup file to a location visible on the host machine through the mount point] and reload/COPY that data back into a db.

from analytics_data_where_house.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.