Compare commits

...

13 Commits

Author SHA1 Message Date
7caa37ea82 添加 Anubis 2025-11-09 00:45:40 +08:00
3e7c667f65 更新 Docker Compose 文件
All checks were successful
continuous-integration/drone/push Build is passing
2025-11-08 06:48:06 +08:00
5a5d863c0c tmtmz10
All checks were successful
continuous-integration/drone/push Build is passing
2025-11-08 06:46:36 +08:00
776c485521 tmtmz9
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:45:41 +08:00
fb07934519 tmtmz8
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:44:04 +08:00
218eb33038 tmtmz7
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:42:09 +08:00
c7f97f6ed6 tmtmz6
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:25:08 +08:00
a8c1a6fe6f tmtmz5
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:15:36 +08:00
7a20b08284 tmtmz4
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:06:41 +08:00
f3aacc459a tmtmz3
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:05:12 +08:00
f9026273f3 tmtmz2
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:04:12 +08:00
0517baa00d tmtmz
Some checks failed
continuous-integration/drone/push Build is failing
2025-11-08 06:03:26 +08:00
5e843083c9 tmtmz 2025-11-08 06:03:16 +08:00
6 changed files with 56 additions and 21 deletions

View File

@ -12,5 +12,5 @@ site/
.venv
# deploy scripts
/deploy
/.drone.yml
deploy
.drone.yml

View File

@ -25,19 +25,28 @@ steps:
volumes:
- name: docker-socket
path: /var/run/docker.sock
- name: 部署到服务器
image: plugins/ansible:3
settings:
playbook: deploy/deploy.ansible.yml
inventory: deploy/inventory.ini
galaxy: deploy/requirements.ansible.yml
primary_key:
from_secret: CI-DEPLOY-KEY
user:
- name: 创建 Ansible Inventory 文件
image: alpine/helm:3.2.1
environment:
CI_DEPLOY_SERVER:
from_secret: CI-DEPLOY-SERVER
CI_DEPLOY_PORT:
from_secret: CI-DEPLOY-PORT
CI_DEPLOY_USER:
from_secret: CI-DEPLOY-USER
extra_vars: |
target_ip:
from_secret: CI-DEPLOY-SERVER
CI_DEPLOY_KEY:
from_secret: CI-DEPLOY-KEY
commands:
- mkdir -p deploy
- echo "[jazzwhom_server]" > deploy/inventory.ini
- echo "prod_doc_server ansible_host=$${CI_DEPLOY_SERVER} ansible_port=$${CI_DEPLOY_PORT} ansible_user=$${CI_DEPLOY_USER}" >> deploy/inventory.ini
- echo "$${CI_DEPLOY_KEY}" > deploy/deploy_key
- chmod 600 deploy/deploy_key
- name: 部署到服务器
image: alpine/ansible:latest
commands:
- ansible-playbook --inventory deploy/inventory.ini --private-key deploy/deploy_key --ssh-common-args='-o StrictHostKeyChecking=no' deploy/deploy.ansible.yml
- name: 发送构建结果到 ntfy
image: parrazam/drone-ntfy
when:

View File

@ -14,4 +14,4 @@
community.docker.docker_compose_v2:
project_src: "{{ app_path }}"
state: present
pull: yes
pull: always

View File

@ -1,4 +1,35 @@
services:
mttu-doc-web:
mttu-doc-web-inner:
image: gitea.service.jazzwhom.top/mttu-developers/docs:latest
restart: unless-stopped
networks:
- mttu-web-inner
mttu-doc-web:
restart: unless-stopped
image: ghcr.io/techarohq/anubis:latest
environment:
- BIND=:80
- TARGET=http://mttu-doc-web-inner:80
- _RESTART_DUMMY=6
- REDIRECT_DOMAINS=*.jazzwhom.top,jazzwhom.top,*.passthem.top,passthem.top
- POLICY_FNAME=/data/cfg/botPolicy.yaml
healthcheck:
test:
- CMD
- anubis
- --healthcheck
interval: 5s
timeout: 30s
retries: 5
start_period: 500ms
depends_on:
- server
networks:
- mttu-web-inner
- caddy-internal
volumes:
- /opt/anubis/botPolicies.yaml:/data/cfg/botPolicy.yaml:ro
networks:
caddy-internal:
external: true

View File

@ -1,3 +0,0 @@
[jazzwhom_server]
# Placeholder target only...
deploy_target_host ansible_host=127.0.0.1 ansible_user=placeholder

View File

@ -1,2 +0,0 @@
collections:
- name: community.docker