Ready to Deploy#
The container from the last milestone contains an integrated database, which is handy for testing but not sufficient for production. In production your container should use an external database. That gives the designer of the infrastructure the flexibility to choose the database solution that’s the right size and cost. In this milestone you must implement the ability for your container to connect to an external database.
Move the integrated SQLite database into a volume (to do this it needs to be in its own directory).
Add the ability to control which database to use:
On first run the
DB_ENGINEenvironment variable should be set to either
postgresto make the selection.
postgresDMBS is selected it should be configured with the following environment variables:
DB_NAME- The name of the database to use.
DB_USER- The user account that accesses the database
DB_PASSWORD- The user’s password
DB_HOST- The hostname of the database server
Turn in answers to the questions in the lab:
Where is the source code of our mysite application?
What are the dependencies of our application?
What is the configuration of our application?
What is the runtime data in our application?
I will pull and run your container.