零基础进入Openresty--helloworld

vultr 主机推荐

Share Your Link: https://www.vultr.com/?ref=6851639
Give $100, Get $35: https://www.vultr.com/?ref=8955885-8H

安装Docker 环境

apt-get -y update;apt-get -y upgrade
sudo curl -sS https://get.docker.com/ | sh
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

生成需要的文件

mkdir -p helloworld/{conf.d,logs,app}

cat >helloworld/conf.d/nginx.conf <helloworld/app/app.lua < 
  

启动访问

# docker run -it -d --name helloworld -p 8080:8080 -v $(pwd):/app vsyour/helloworld

cat >helloworld/docker-compose.yml < 
  

访问: http://ip:8888

 

零基础进入Openresty--helloworld_第1张图片

零基础进入Openresty--helloworld_第2张图片

你可能感兴趣的:(openresty,linux)