takttusur / takt-media

Check our news and participate to competitions and other events
MIT License
0 stars 0 forks source link

Add Docker and docker-compose support #7

Closed andreygolubkow closed 9 months ago

andreygolubkow commented 10 months ago

Add Docker and docker-compose support

Acceptance criteria

  1. Create new project TaktTusur.Media.BackgroundCrawler, use Background worker project type
  2. Add dockerfile to TaktTusur.Media.BackgroundCrawler with a build script and run script inside
    1. The project should be built in docker
    2. The project should be hosted in docker, what means, when I start a container the worker will start work
  3. Add dockerfile to TaktTusur.Media.Api
    1. The project should be build in docker
    2. The project should be hosted in docker, what means, when I start a container the API start work, and API port should be exposed
  4. Write docker build scripts in command line and put it as a comment into this issue
    1. Scripts should be started from the root directory of solution, not from project dir
  5. Write docker-compose file, which starts TaktTusur.Media.BackgroundCrawler and TaktTusur.Media.Api at the same time

Technical details

https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?tabs=windows&pivots=dotnet-7-0 https://learn.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-7.0 https://docs.docker.com/language/dotnet/develop/

bud-dha commented 9 months ago

docker build -f TaktTusur.Media.BackgroundCrawler\Dockerfile -t IMAGE_NAME . docker build -f TaktTusur.Media.Api\Dockerfile -t IMAGE_NAME .