GSA / data.gov

Main repository for the data.gov service
https://data.gov
Other
607 stars 98 forks source link

scale and configure 2 postgres instances #4750

Closed rshewitt closed 4 months ago

rshewitt commented 4 months ago

User Story

In order to isolate database interaction between applications, datagov wants to create 2 instances of postgres with the flask app talking to one and harvesting logic talking to the other.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

Background

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]

Sketch

rshewitt commented 4 months ago

@jbrown-xentity comments from slack

We could use scale, but I would suggest using project-name: https://forums.docker.com/t/docker-compose-create-multiple-instances/90086/2 https://docs.docker.com/compose/project-name/ Use environment variable precedence and the docker-compose cli to overwrite the DB port mapping to the local machine, and thereby have a unique instance of the DB that is used for integration testing, different from the current manual app/testing that is occurring. This will more closely replicate what will happen on cloud.gov.