# Docker Uygulamanın geliştirme aşamasında aşağıdaki bağımlılıklara ihtiyacınız olacaktır. Tamamının ilk günden oluşturulması gerekmeyebilir. [[_TOC_]] ## `PostgreSQL` veritabanının çalıştırılması Aşağıdaki şekilde bir docker container'i çalıştırıp kendi bilgisayarınızda kod geliştirebileceğiniz gibi, direkt olarak Azure PostgreSQL üzerinde bulunan Dev veritabanına bağlanarak da geliştirme yapılabilir. Eğer migration işlemleri gerçekleştirecekseniz ilk önce lokalinizde denemenizde fayda olacaktır. ```bash docker run -d -p 5432:5432 --name HrNextLocalPostgreSqlServer --restart=always -e POSTGRES_PASSWORD=123456 postgres ```` ## `RabbitMQ` çalıştırılması Notification altyapısı [RabbitMQ](https://www.rabbitmq.com) ve [MassTransit](https://masstransit-project.com) üzerine kurgulandı. İleride başka haberleşme altyapılarını da bu mantık ile ilerletmeyi düşünüyoruz. ```bash docker run -d --hostname rabbit-host --name rabbit --restart=always -p 8095:15672 -p 5672:5672 rabbitmq:3-management ``` ## `Redis` çalıştırılması Uygulamanın distributed cache ihtiyaçları için [Redis](https://redis.io) kullanıyoruz. ```bash docker run -d -p 6379:6379 --name redis-host --restart=always redis ``` ## `docker build` komutunun çalıştırılması _Perfx_'deki her bir mikro servis ayrı _Docker_ imajları halinde build olmaktadır. Aşağıda, örnek birkaç servis için build scriptlerini bulabilirsiniz. > Build işlemleri, Perfx projesinin root dizini altından çalıştırılmalıdır (.sln ve .git'in olduğu klasör) ```bash # Performance Api (Web Api Project) # SKIP_TEST_RUN değişkeni true ya da false olabilir docker build -t sdxtesteuwhrnextcr01.azurecr.io/hrnext-performance-api -f projects/server/src/HRNext.Performance.Api/Dockerfile --network host --build-arg SKIP_TEST_RUN=true . # User Api (Web Api Project) docker build -t sdxtesteuwhrnextcr01.azurecr.io/hrnext-user-api -f projects/server/src/HRNext.User.Api/Dockerfile --network host . # Notification Api (Web Api Project) docker build -t sdxtesteuwhrnextcr01.azurecr.io/hrnext-notification-api -f projects/server/src/HRNext.Notification.Api/Dockerfile --network host . # IdentityServer (MVC Project) docker build -t sdxtesteuwhrnextcr01.azurecr.io/hrnext-identityserver -f projects/server/src/HRNext.IdentityServer/Dockerfile --network host . # Integration (Console App) docker build -t sdxtesteuwhrnextcr01.azurecr.io/hrnext-performance-integration -f projects/integration/src/HRNext.Performance.Integration/Dockerfile . # Vue.js Client App docker build -t sdxtesteuwhrnextcr01.azurecr.io/hrnext-client -f projects/client/src/HRNext.Performance.Client/Dockerfile . ```