From the course: Deploying ASP.NET Core Applications

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Kestrel and NGINX with Compose

Kestrel and NGINX with Compose

From the course: Deploying ASP.NET Core Applications

Start my 1-month free trial

Kestrel and NGINX with Compose

- [Instructor] First we need to create a Docker file for the new Nginx container we need. To keep things organized, I'll create a folder here in my project folder called nginx. I'll use Notepad to create the new Docker file and save it in the nginx folder as Dockerfile with no extension. There's already a public base image for Nginx, so we can use FROM nginx to get started really quickly. The only thing we need to do is customize the Nginx configuration, so we'll copy our own nginx.conf file into the image. We need to copy it to /etc/nginx/nginx.conf. And that takes care of the docker file. Now we need to create nginx.conf. Save this also in the nginx folder as nginx.conf with quotes to preserve the extension. This Nginx configuration will be very similar to the configuration we used earlier when we configured Nginx on a Linux machine. This time it includes a few more elements. We need an events group that specifies the maximum number of concurrent worker connections. This means that…

Contents