update
This commit is contained in:
17
nginx/Demo/SingleNode/README.md
Normal file
17
nginx/Demo/SingleNode/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# 部署单节点 nginx
|
||||
|
||||
- 根据实际环境修改
|
||||
- docker-compose.yml
|
||||
- nginx/http.d/80.conf
|
||||
|
||||
- 创建目录
|
||||
```
|
||||
grep '\<source:' docker-compose.yml | cut -d: -f2 | xargs mkdir -p
|
||||
```
|
||||
|
||||
- 上传可能需要的前端文件到 nginx/html/ 下
|
||||
- 启动
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
22
nginx/Demo/SingleNode/docker-compose.yml
Normal file
22
nginx/Demo/SingleNode/docker-compose.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: harbor.colben.cn/general/nginx
|
||||
container_name: nginx
|
||||
restart: "on-failure"
|
||||
stop_grace_period: 5m
|
||||
privileged: true
|
||||
ports:
|
||||
- 80:80
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./nginx/html
|
||||
target: /var/lib/nginx/html
|
||||
- type: bind
|
||||
source: ./nginx/http.d
|
||||
target: /etc/nginx/http.d
|
||||
- type: bind
|
||||
source: ./nginx/log
|
||||
target: /var/log/nginx
|
||||
|
5
nginx/Demo/SingleNode/nginx/http.d/80.conf
Normal file
5
nginx/Demo/SingleNode/nginx/http.d/80.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
server {
|
||||
listen 80;
|
||||
location / {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user