I would like to put away azure file storage and use dropbox to host my website files.
I found it much faster to load my website when using local files. (because azure files are access from Samba).
A great thing I found is that I don't even need to stop my old docker container to start my new docker container.
Because my world press docker container is behind nginx proxy, the only thing I need to do is starting a new docker container with the same VIRTUAL_HOST name.
sudo docker run -d --name wp4 \
--network wp-net --network-alias wp4-host \
-e VIRTUAL_HOST=www.dengnz.com \
-e "LETSENCRYPT_HOST=www.dengnz.com" \
-e "LETSENCRYPT_EMAIL=email@email.com" \
-v $PWD/html:/var/www/html -p 8083:80 wordpress
Now, nginx proxy will work as a load balance, some traffics are redirected to my old docker container (using azure file). And some traffic will be redirected to my new container (using local files).
There will be two ip addresses in the upstream section of the config file
/etc/nginx/conf.d# cat default.conf
well, only one left now, as I stopped the old one.
As my new container is working well. Then I safely stopped my old container.
Website migrated smoothly.
Feng
没有评论:
发表评论