I have been contemplating my last blog statement about using the containers in the cloud and I think that may have been a little misplaced. If you are in the cloud, use a real SQL Server and Dynamo Db instance. Soooo, this entry will be simply to move the Dynamo Db Dockerfile created in the last blog entry to be used with a command called docker-compose. For the future, I will use the local Dynamo Db and SQL Server instances for local development tests.
Docker-compose is a command I have become aware of. As described in reference #2, it is a tool for dealing with multiple docker containers. Its ‘contents’ are contained in a file called ‘docker-compose.yml’ Since I have 2 (I will move the SQL Server container into the docker-compose.yml in the next blog post), it seems like a good tool to use 🙂
To create the TGIMBA API docker-compose.yml:
- I deleted the aws dynamo db files downloaded earlier.
- I moved the contents of the Dockerfile into one called ‘tgimba.dynamo.Docker’.
- Added a docker-compose.yml file to the root of the TGIMBA API project which I modeled after reference #1,
- run this command in terminal – docker-compose up -d
NOTE: When I went to run it all again, I got some container conflicts. To overcome, I ran the three docker statements I put in the last blog post to completely clear out my docker setup. I was not expecting this.
- I modified the local dynamo db url to point to 8000.
- Started the SQL Server container (see reference #4) and ran the integration tests
I will attempt to place the SQL Server instance into the docker-compose.yml file as well for next time.