init openresty gateway

This commit is contained in:
wdh
2026-05-18 16:22:55 +08:00
commit 6ab44ea187
9 changed files with 430 additions and 0 deletions

34
docker-compose.yml Normal file
View File

@@ -0,0 +1,34 @@
services:
openresty:
image: openresty/openresty:alpine
container_name: openresty-gateway
network_mode: host
restart: unless-stopped
volumes:
# 主配置
- ./conf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf:ro
# HTTP 配置
- ./conf/conf.d:/usr/local/openresty/nginx/conf/conf.d:ro
# Stream 配置
- ./conf/stream.d:/usr/local/openresty/nginx/conf/stream.d:ro
# 静态网站 + acme challenge
- ./www:/var/www
# SSL 证书
- ./certs:/etc/letsencrypt
# 日志
- ./logs:/usr/local/openresty/nginx/logs
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./www:/var/www
- ./certs:/etc/letsencrypt
entrypoint: ""
command: sh -c "certbot certonly \
--webroot -w /var/www \
-d ai.sggai.site \
-d dms.sggai.site \
-d lsbd2.loveteemo.com \
--email 243823965@qq.com \
--agree-tos --non-interactive --force-renewal"