Dynamic host multiple websites on the same server and port with Docker and Nginx

preview_player
Показать описание
To get started, let’s start up the nginx-proxy container. This can be accomplished either by a single docker command, or using docker-compose

let’s create a Docker network. The network will allow our containers to “talk” among themselves

#1 docker network create nginx-proxy
#2 Installing nginx-proxy with docker-compose create docker compose file
version: "3"
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
volumes:

networks:
default:
external:
name: nginx-proxy

#3 docker-compose up -d

#4 docker run -d --name blog --expose 80 --net nginx-proxy -e VIRTUAL_HOST=domain wordpress
#5 docker run -d --name blog --expose 81 --net nginx-proxy -e VIRTUAL_HOST=domain wordpress
Рекомендации по теме
Комментарии
Автор

Please make a video in 2024 in ubutu 22.04 version

nuzhatkhan
Автор

Nice, works fine here...
But, how i add https?

ports:
- "443:443"

And Expose 443?

Flamolino
Автор

very good, simple . can you help to get the docker file for wordpress also, and also how to have common phpadmin and sql

sudhadotsudha
Автор

Please show us how this jwilder/nginx-proxy need to be configured to be secure, using ssl and using the let's encrypt service as an automated service for cert renewal after 90 Days.

Please also show us the docker-compose.yml for that and including the persitence settings to make sure that all is working after a reboot of the docker host.
Thanks

hsmerlin
Автор

my wordpress is not comming whats the problem

mimahmed
Автор

Thanks for your video.
I'd like to chat more. Can I have your email?
Thanks!!

ramilocosta