Host a static website using the Docker container , Build a image using the Dockerfile Docker - 2

Опубликовано: 25 Апрель 2023
на канале: Devops TerraByte
595
4

In this viedo we will host a static website using the docker

First we will create a Dockerfile and build a image and then from the image will create a container.
Then add the container port in the nginx configuration file to run the website .

Nginx configration file for the 80 port :-

server {
listen 80;
server_name static.shivm04.xyz; # Edit this to your domain name
client_max_body_size 100M;

location / {
proxy_pass http://localhost:8081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 1800;
proxy_connect_timeout 1800;
proxy_send_timeout 1800;
send_timeout 1800;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}

}


#ubuntu
#docker
#container
#staticwebsite


Смотрите видео Host a static website using the Docker container , Build a image using the Dockerfile Docker - 2 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Devops TerraByte 25 Апрель 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 595 раз и оно понравилось 4 людям.