hackoregon / transportation-system-backend

2018 repo for the transportation api backend
MIT License
8 stars 2 forks source link

Change the Docker Image for the Database and update necessary files #25

Closed bhgrant8 closed 6 years ago

bhgrant8 commented 6 years ago

We need to update to the new version of our db image. The base files are located in this directory: https://github.com/hackoregon/data-science-pet-containers as the 'postgis' image

What changes need to be made?

I see:

  1. Match the docker-compose.yml files 'db' portion to the 'postgis' portion of the small.yml file.
  2. update the DOCKERFILE.db file to match the DOCKERFILE.postgis
  3. create a BACKUPS directory and add this file: https://github.com/hackoregon/data-science-pet-containers/blob/master/containers/Backups/restore-all.sh
  4. confirm database backup files will be in the .gitignore
  5. make sure to download database backups into the folder before running container.
znmeb commented 6 years ago

Looks about right - where's the current docker-compose.yml? It'll probably be faster if I do a branch and a pull request.

bhgrant8 commented 6 years ago

Here is the compose: https://github.com/hackoregon/transportation-system-backend/blob/staging/docker-compose.yml

And dockerfile: https://github.com/hackoregon/transportation-system-backend/blob/staging/DOCKERFILE.db

znmeb commented 6 years ago

OK - branch is https://github.com/hackoregon/transportation-system-backend/tree/znmeb-merge-new-database

I have the build working on my workstation - for some reason docker-compose didn't see the image name variables so I hard-coded them in docker-compose.yml.

docker run -it --rm -p 5439:5432 db works and I can see the databases in pgAdmin - I restored both odot_crash_data and passenger_census (ridership data).

TBD:

  1. Test build on a different machine.
  2. Figure out the environment thing
  3. Make sure it all runs
znmeb commented 6 years ago

Fixed in branch znmeb-merge-new-database