![]() ![]() (Usually you would separate the environment settings from the base or static information related to the SQL Server image.) sqldata: Note that the YAML code has consolidated configuration information from the generic docker-compose.yml file and the file. The SQL Server container in the sample application is configured with the following YAML code in the docker-compose.yml file, which is executed when you run docker-compose up. Keep in mind that this is a good-enough solution for development and, perhaps, testing but not for production. ![]() In this case, they are all in the same container to keep Docker memory requirements as low as possible. In eShopOnContainers, there's a container named sqldata, as defined in the docker-compose.yml file, that runs a SQL Server for Linux instance with the SQL databases for all microservices that need one.Ī key point in microservices is that each microservice owns its related data, so it should have its own database. SQL Server running as a container with a microservice-related database Having those databases as containers is also great for integration tests, because the database is started in the container and is always populated with the same sample data, so tests can be more predictable. However, for development and test environments, having your databases running as containers is convenient, because you don't have any external dependency and simply running the docker-compose up command starts the whole application. You can have your databases (SQL Server, PostgreSQL, MySQL, etc.) on regular standalone servers, in on-premises clusters, or in PaaS services in the cloud like Azure SQL DB. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |