TodoList icon indicating copy to clipboard operation
TodoList copied to clipboard

Docker support

Open amoraitis opened this issue 4 years ago • 5 comments

It would be nice to create a Dockerfile for this project

amoraitis avatar Jul 29 '19 17:07 amoraitis

Fixed in 909ac9a Needs enhancement and things like https in production enviroment More information here

amoraitis avatar Aug 04 '19 15:08 amoraitis

I think it would be nice to also add docker support for development purposes. We currently require MSSQL Server or Express installed locally on the machine to be able to work on the project. While this might be OK for devs on Windows, it is a bit painful to get this going in Linux or MacOS. Some may also not want to install full fledge server on local machine. It would be nice to containerize this in docker to help us get us going quickly.

Proposed Solution

  • Docker compose MSSQL and/or any other future dev essential tools required for infrastructure.
  • Attach a volume so that the data doesn't get wiped after shutting down/ removing docker container.
  • Provide instruction on how to get this infrastructure up.
  • This infrastructure docker file will live outside of Web or solution file.
  • This also opens up possibility of developing purely in non-windows environment.
  • Gives us opportunity to try various other infrastructure tools such as Redis Cache etc.

@amoraitis If you agree with the proposed solution, I can get started on this.

kebin avatar Feb 06 '20 18:02 kebin

Hi @kebin , as you can see we already support docker. This issue is left open on purpose, because we want to continue adding docker support as the project expands. Please see #59, which adds a new project, but it doesn't support docker yet. That's why we don't merge it yet.

If you like, you can fork from branch: feature/#44-todolist-api to add support for docker. If not, you can check where we want to improve our docker support.

amoraitis avatar Feb 11 '20 16:02 amoraitis

@amoraitis Thanks for the comment! The issue with the current docker-compose file is that:

  • It doesn't work well for development workflow. For eg. If I were to actively debug/ run the app locally, the current project in the dockerfile is build with Release flag and therefore any dev specific Appsettings will not work. We cannot debug the code with the infrastructure intact.
  • Application Data stored in MSSQL container is wiped out when container is stopped and/or removed.
  • IMO separating out application specific docker file from the current compose file will help with this issue.

My proposal is to create a compose file that aids during development. i.e as a developer I'd run the compose file to setup and bring up the infrastructure quickly. This enables us to focus mostly on application code, run in any environment(dev, release, debug) etc.

kebin avatar Feb 11 '20 17:02 kebin

Yes, I agree with you @kebin. Go ahead and create a PR when you are ready. But it would be wiser to finish #59 because then we will need to make changes for the new API project too.

amoraitis avatar Feb 13 '20 13:02 amoraitis