Skip to content

Commit 188456e

Browse files
author
liuhang
committed
测试dockercompose 上传
1 parent ee362eb commit 188456e

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.github/workflows/deploy.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,18 @@ jobs:
6767
# 2. 重启容器 (up -d 会自动检测镜像变化并重新创建容器)
6868
docker-compose up -d --remove-orphans
6969
# 3. 清理无用的旧镜像
70-
docker image prune -f
70+
docker image prune -f
71+
sync-docercompse-files:
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Checkout Code
75+
uses: actions/checkout@v4
76+
77+
- name: Copy docker-compose to Server
78+
uses: appleboy/scp-action@master
79+
with:
80+
host: ${{ secrets.SERVER_IP }}
81+
username: ${{ secrets.SSH_USER }}
82+
key: ${{ secrets.SSH_PRIVATE_KEY }}
83+
source: "docker-compose/waline-service/docker-compose.yaml"
84+
target: "/root/blog/waline-service/"

docker-compose/docker-compose.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
version: '4'
2+
3+
services:
4+
waline:
5+
image: lizheming/waline:latest
6+
container_name: waline-standalone
7+
restart: always
8+
ports:
9+
- "8360:8360"
10+
environment:
11+
- MYSQL_HOST=blog-stats-db
12+
- MYSQL_PORT=3306
13+
- MYSQL_DB=waline_db
14+
- MYSQL_USER=root
15+
- MYSQL_PASSWORD=GB_UXa>cX*h!K2
16+
- MYSQL_CHARSET=utf8mb4
17+
- MYSQL_SSL=false
18+
- TABLE_PREFIX=wl_
19+
20+
- TZ=Asia/Shanghai
21+
- LANG=zh_CN.UTF-8
22+
- JWT_SECRET=Standalone_Waline_Secret_2025
23+
# --- 通知配置 ---
24+
- SITE_NAME=Hangliuc
25+
- SITE_URL=https://hangops.top
26+
27+
# 163
28+
- SMTP_SERVICE=163
29+
- SMTP_USER=iliuhang@163.com
30+
- SMTP_PASS=JKiFwCcnhxaXHUgP
31+
- SMTP_SECURE=true
32+
- AUTHOR_EMAIL=iliuhang@163.com
33+
- SENDER_EMAIL=iliuhang@163.com
34+
35+
networks:
36+
- ext-blog-net
37+
38+
networks:
39+
ext-blog-net:
40+
external: true
41+
name: blog-stats_blog-net
42+

0 commit comments

Comments
 (0)