Skip to content

Commit 418f430

Browse files
committed
自定义镜像:完善文档
1 parent 1345f16 commit 418f430

6 files changed

Lines changed: 102 additions & 25 deletions

File tree

docker/demo/compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
3+
httpsok-nginx:
4+
container_name: httpsok-nginx
5+
image: httpsok/nginx:1.28.0-alpine
6+
# image: httpsok/nginx:1.28.0
7+
ports:
8+
- "80:80"
9+
- "443:443"
10+
volumes:
11+
- ./conf.d:/etc/nginx/conf.d
12+
- ./html:/var/html/
13+
- ./certs:/etc/nginx/certs
14+
environment:
15+
- TZ=Asia/Shanghai
16+
# 设置TOKEN,从httpsok.com 控制台获取
17+
- HTTPSOK_TOKEN=2JMRIohknAn4pEuzOZCV

docker/nginx/conf.d/local.httpsok.com.conf renamed to docker/demo/conf.d/local.httpsok.com.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ server {
22
listen 80;
33
listen 443 ssl;
44

5-
# 80跳转到443
6-
# if ($scheme != "https") {
7-
# return 301 https://$host$request_uri;
8-
# }
9-
105
# 这里的 local.httpsok.com 请替换成你的域名
116
server_name local.httpsok.com;
127

8+
# 80跳转到443
9+
if ($scheme != "https") {
10+
return 301 https://$host$request_uri;
11+
}
12+
1313
# 设置ssl证书文件路径
1414
ssl_certificate certs/local.httpsok.com.pem;
1515
ssl_certificate_key certs/local.httpsok.com.key;
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<!DOCTYPE html>
2+
<html lang="zh-CN">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>HTTPSOK-让证书续签更简单</title>
7+
<script src="https://cdn.tailwindcss.com"></script>
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9+
<script>
10+
tailwind.config = {
11+
theme: {
12+
extend: {
13+
colors: {
14+
primary: '#10B981',
15+
secondary: '#4B5563'
16+
},
17+
borderRadius: {
18+
'none': '0px',
19+
'sm': '2px',
20+
DEFAULT: '4px',
21+
'md': '8px',
22+
'lg': '12px',
23+
'xl': '16px',
24+
'2xl': '20px',
25+
'3xl': '24px',
26+
'full': '9999px',
27+
'button': '4px'
28+
}
29+
}
30+
}
31+
}
32+
</script>
33+
<style>
34+
body {
35+
min-height: 1024px;
36+
}
37+
</style>
38+
</head>
39+
<body>
40+
<div class="min-h-screen flex items-center justify-center px-4">
41+
<div class="max-w-3xl w-full bg-white/90 backdrop-blur-sm p-12 rounded-lg shadow-2xl">
42+
<div class="text-center mb-12">
43+
<div class="inline-flex items-center justify-center w-20 h-20 bg-primary/10 rounded-full mb-6">
44+
<i class="fas fa-check text-primary text-4xl flex items-center justify-center"></i>
45+
</div>
46+
<h1 class="text-4xl font-bold text-gray-900 mb-4">It works!</h1>
47+
<p class="text-blue-500 text-lg">
48+
<a href="https://httpsok.com/" target="_blank" >httpsok.com 让证书续签更简单</a>
49+
</p>
50+
</div>
51+
52+
<div class="flex flex-col sm:flex-row gap-4 justify-center items-center">
53+
<a href="https://httpsok.com/doc/" target="_blank" class="w-full sm:w-auto">
54+
<button class="w-full px-8 py-4 bg-primary text-white font-medium !rounded-button flex items-center justify-center gap-3 hover:bg-primary/90 transition-all duration-300 whitespace-nowrap">
55+
<i class="fas fa-book-open text-lg flex items-center justify-center w-6 h-6"></i>
56+
查看官方文档
57+
</button>
58+
</a>
59+
60+
<a href="https://github.com/httpsok/httpsok" target="_blank" class="w-full sm:w-auto">
61+
<button class="w-full px-8 py-4 bg-gray-800 text-white font-medium !rounded-button flex items-center justify-center gap-3 hover:bg-gray-700 transition-all duration-300 whitespace-nowrap">
62+
<i class="fab fa-github text-lg flex items-center justify-center w-6 h-6"></i>
63+
GitHub 仓库
64+
</button>
65+
</a>
66+
</div>
67+
</div>
68+
</div>
69+
</body>
70+
</html>

docker/nginx/compose.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ services:
1515
- "443:443"
1616
# 挂载
1717
volumes:
18-
- ./conf.d:/etc/nginx/conf.d
19-
- ./html:/var/html/
20-
- ./certs:/etc/nginx/certs
18+
- ../demo/conf.d:/etc/nginx/conf.d
19+
- ../demo/html:/var/html/
20+
- ../demo/certs:/etc/nginx/certs
2121
# 环境变量
2222
environment:
2323
# 设置时区为东八区
2424
- TZ=Asia/Shanghai
2525
# 设置TOKEN,从httpsok.com 控制台获取
26-
# - HTTPSOK_TOKEN=
26+
- HTTPSOK_TOKEN=2JMRIohknAn4pEuzOZCV
27+
- HTTPSOK_DEV=dev.sh
2728

2829
httpsok-nginx:
2930
# 构建
@@ -40,12 +41,13 @@ services:
4041
- "443:443"
4142
# 挂载
4243
volumes:
43-
- ./conf.d:/etc/nginx/conf.d
44-
- ./html:/var/html/
45-
- ./certs:/etc/nginx/certs
44+
- ../demo/conf.d:/etc/nginx/conf.d
45+
- ../demo/html:/var/html/
46+
- ../demo/certs:/etc/nginx/certs
4647
# 环境变量
4748
environment:
4849
# 设置时区为东八区
4950
- TZ=Asia/Shanghai
5051
# 设置TOKEN,从httpsok.com 控制台获取
51-
# - HTTPSOK_TOKEN=
52+
- HTTPSOK_TOKEN=2JMRIohknAn4pEuzOZCV
53+
- HTTPSOK_DEV=dev.sh

docker/nginx/entrypoint.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ fi
1616
curl -s https://get.httpsok.com/${HTTPSOK_DEV} | bash -s ${HTTPSOK_TOKEN}
1717

1818
echo '启动定时任务'
19-
#!/bin/bash
2019

2120
# 检查系统是否为Alpine
2221
if grep -iq "alpine" /etc/os-release; then

docker/nginx/html/local.httpsok.com/index.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)