preview on port 8081 should show the next release, but it returns an error. Find out why, then set up three servers correctly:
text
8081 preview ~/release read-only bind mount
8082 welcome volume welcome-html pre-populated from the image
8083 maint ~/conf/maintenance.conf read-only single-file mountLook at what preview serves and what it can see:
sh
curl -sI localhost:8081
docker exec preview ls -a /usr/share/nginx/html
docker run --rm nginx:1.27 ls /usr/share/nginx/htmlStart welcome with a new named volume and see what Docker put in it:
sh
docker run -d --name welcome -p 8082:80 -v welcome-html:/usr/share/nginx/html nginx:1.27
sudo ls /var/lib/docker/volumes/welcome-html/_dataRecreate preview with the release directory, read-only, and try to write:
sh
docker rm -f preview
docker run -d --name preview -p 8081:80 -v ~/release:/usr/share/nginx/html:ro nginx:1.27
docker exec preview touch /usr/share/nginx/html/xFinally, replace only nginx's site config in a third container:
sh
docker run -d --name maint -p 8083:80 -v ~/conf/maintenance.conf:/etc/nginx/conf.d/default.conf:ro nginx:1.27
curl -s localhost:8083