Git Product home page Git Product logo

amarinhub / docker-compose-dotnet-core-and-mysql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tometchy/docker-compose-dotnet-core-and-mysql

0.0 1.0 0.0 14 KB

Example of docker-compose system - Dotnet Core app composed with MySQL database

Home Page: https://SoftwareDeveloper.Blog/docker-compose-introduction-dotnet-core-app-composed-with-mysql-database

License: MIT License

C# 88.62% Dockerfile 11.38%

docker-compose-dotnet-core-and-mysql's Introduction

Docker compose Dotnet Core and MySQL example system

Example docker-compose system, based on .NET Core project and MySQL database (accessed with Dapper).

Dotnet Dockerfile and basic Docker setup based on SoftwareDeveloper.Blog introduction to Docker.

Docker-compose configuration used in this example is explained line by line in SoftwareDeveloper.Blog introduction to docker-compose.

Docker-compose up

if you want to see this example running, you can just type docker-compose up from solution directory.

Docker-compose up -d

If you want run this example but without attaching console, run docker-compose up in detach mode - docker-compose up -d.

Docker-compose up --build

If you have already composed system up, but then changed source code, you need to pass --build parameter, when running docker-compose up next time: docker-compose up --build. Of course it can be used along with detach parameter.

Docker-compose down

When you want to clean up containers and networks created by docker-compose, just type docker-compose down from solution directory.

Check if system works

If you want to see if this example system works properly, just access in your browser following GET address - http://localhost:8080 and you should see following results taken from database:

[
  {
    "id": 1,
    "name": "Dependency Injection Principles, Practices, and Patterns",
    "description": "Book by Steven van Deursen and Mark Seemann"
  },
  {
    "id": 2,
    "name": "Agile Software Development, Principles, Patterns, and Practices",
    "description": "Book by Robert C. Martin"
  }
]

If you see empty result, wait a while and try again - maybe MyQSL database is not fully initialized yet.

docker-compose-dotnet-core-and-mysql's People

Contributors

tometchy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.