添加acme,frps和nginx项目
This commit is contained in:
31
nginx/docker-compose.yml
Normal file
31
nginx/docker-compose.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
version: "3.5"
|
||||
|
||||
#设定network. 其他应用应设置network的external为本网络,以和nginx服务器互通。
|
||||
networks:
|
||||
firstnet:
|
||||
name:nginx_firstnet
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.20.0.0/16
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data/conf/conf.d:/etc/nginx/conf.d
|
||||
- ./data/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./data/html:/usr/share/nginx/html
|
||||
- ./data/logs:/var/log/nginx
|
||||
# 此处的配置取决于conf.d下的配置文件中如何配置证书路径。例如:“ssl_certificate /etc/letsencrypt/live/git.woyue.org/fullchain.pem;”等
|
||||
- ../certbot/conf:/etc/letsencrypt
|
||||
# 此处的配置取决于conf.d下的配置文件中的配置“location /.well-known/acme-challenge/”,可参看sample.conf:
|
||||
- ../certbot/www:/var/www/certbot
|
||||
networks:
|
||||
firstnet:
|
||||
ipv4_address: 172.20.0.2
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
||||
Reference in New Issue
Block a user