Giter Site home page Giter Site logo

nginx's Introduction

nginx容器

对官方的nginx镜像修改了默认的配置文件

后续要增加的server站点

  • http项目的.conf文件 映射到容器内的 /etc/nginx/conf.d 下
  • 流转发项目的.conf文件 映射到容器内的 /etc/nginx/stream.d 下

环境变量

  • WORK_PROCESSES

    默认为 4, nginx的工作进程数 , 防止部分物理机核心多导致容器内存溢出

  • WORK_USER

    默认 nginx,如果该项不是 nginx ,就会创建该值是用户

  • WORK_USERID (可选)

    如果${WORK_USER} 不是nginx , 创建用户时候,用户的UID

示例的docker-compose.yml
nginx:
  image: test:nginx
  container_name: nginx
  volumes:
    - ./conf.d:/etc/nginx/conf.d            #里面放 http_server 的 conf 文件
    - ./stream.d:/etc/nginx/stream.d        #里面放 stream_proxy_server 的 conf 文件
  ports:
    - 80:80
    - 8080:8080 
    - 7011:7011

如果要调试,需要安装一些工具,可以更新apk安装源

# 外网替换安装源
ali-internet-repositories

# 内网替换安装源
ali-internal-repositories

# 执行完之后 
apk update

nginx's People

Contributors

buzhiyun avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.