ocker nacos && mysql
https://github.com/nacos-group/nacos-docker/blob/master/README_ZH.md
git clone --depth 1 https://github.com/nacos-group/nacos-docker.git
cd nacos-docker
docker-compose -f example/cluster-hostname.yaml up -d
docker nginx
docker run -it --name nginx --net host -v /root/project:/var/www/html -v /root/docker/nginx:/nginx_conf -d nginx
docker exec -it nginx bash
mv /etc/nginx/conf.d /nginx_conf && ln -s /nginx_conf/conf.d /etc/nginx
mv /etc/nginx/nginx.conf /nginx_conf && ln -s /nginx_conf/nginx.conf /etc/nginx
cd /nginx_conf/nginx.conf
mv default.conf nacos.conf
vim nacos.conf
upstream nacos {
server 127.0.0.1:8850;
server 127.0.0.1:8849;
server 127.0.0.1:8845;
}
server {
listen 80;
listen [::]:80;
server_name localhost;
location /nacos {
proxy_pass http://nacos/nacos;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
docker restart nginx
|