init
This commit is contained in:
2
caddy/.env
Normal file
2
caddy/.env
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
UID=1001
|
||||||
|
GID=1001
|
||||||
2
caddy/.gitignore
vendored
Normal file
2
caddy/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
config/
|
||||||
|
data/
|
||||||
19
caddy/compose.yaml
Normal file
19
caddy/compose.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
services:
|
||||||
|
caddy:
|
||||||
|
image: caddy:2.11
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
- "443:443/udp"
|
||||||
|
volumes:
|
||||||
|
- ./conf:/etc/caddy
|
||||||
|
- ./site:/srv
|
||||||
|
- ./data:/data
|
||||||
|
- ./config:/config
|
||||||
|
networks:
|
||||||
|
- eryfel-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
eryfel-net:
|
||||||
|
external: true
|
||||||
16
caddy/conf/Caddyfile
Normal file
16
caddy/conf/Caddyfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
eryfel.net {
|
||||||
|
root * /srv
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|
||||||
|
www.eryfel.net {
|
||||||
|
redir https://eryfel.net{uri}
|
||||||
|
}
|
||||||
|
|
||||||
|
git.eryfel.net {
|
||||||
|
reverse_proxy gitea:3000
|
||||||
|
}
|
||||||
|
|
||||||
|
cal.eryfel.net {
|
||||||
|
reverse_proxy radicale:5232
|
||||||
|
}
|
||||||
BIN
caddy/site/beian.png
Executable file
BIN
caddy/site/beian.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
80
caddy/site/index.html
Normal file
80
caddy/site/index.html
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Ery's Space</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
color: #2c3e50;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
text-align: center;
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
h1 { font-weight: 300; letter-spacing: 1px; }
|
||||||
|
.sub-text { color: #95a5a6; font-size: 0.9rem; }
|
||||||
|
|
||||||
|
/* 备案信息布局 */
|
||||||
|
.footer {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px; /* 两行之间的间距 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 20px; /* 固定高度确保对齐 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.beian-link {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #bdc3c7;
|
||||||
|
font-size: 12px;
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beian-link:hover {
|
||||||
|
color: #3498db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beian-icon {
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
margin-right: 4px;
|
||||||
|
/* 图片与文字中轴线对齐的关键 */
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h1>Welcome</h1>
|
||||||
|
<p class="sub-text">Ery's Technical Space</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
<div class="line">
|
||||||
|
<a href="https://beian.miit.gov.cn/" target="_blank" class="beian-link">蜀ICP备2026009904号-1</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="line">
|
||||||
|
<img src="beian.png" class="beian-icon" alt="公安备案图标"/>
|
||||||
|
<a href="https://beian.mps.gov.cn/#/query/webSearch?code=51015602001641" rel="noreferrer" target="_blank" class="beian-link">川公网安备51015602001641号</a>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
2
gitea/.env
Normal file
2
gitea/.env
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
UID=1001
|
||||||
|
GID=1001
|
||||||
1
gitea/.gitignore
vendored
Normal file
1
gitea/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
data/
|
||||||
15
gitea/compose.yaml
Normal file
15
gitea/compose.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
services:
|
||||||
|
gitea:
|
||||||
|
image: docker.gitea.com/gitea:1.25.5-rootless
|
||||||
|
restart: always
|
||||||
|
userns_mode: "keep-id"
|
||||||
|
user: "${UID}:${GID}"
|
||||||
|
volumes:
|
||||||
|
- ./data:/var/lib/gitea:Z,U
|
||||||
|
- ./config:/etc/gitea:Z,U
|
||||||
|
networks:
|
||||||
|
- eryfel-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
eryfel-net:
|
||||||
|
external: true
|
||||||
98
gitea/config/app.ini
Normal file
98
gitea/config/app.ini
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
APP_NAME = Ery's Gitea
|
||||||
|
RUN_USER = git
|
||||||
|
RUN_MODE = prod
|
||||||
|
WORK_PATH = /var/lib/gitea
|
||||||
|
|
||||||
|
[repository]
|
||||||
|
ROOT = /var/lib/gitea/git/repositories
|
||||||
|
|
||||||
|
[repository.local]
|
||||||
|
LOCAL_COPY_PATH = /tmp/gitea/local-repo
|
||||||
|
|
||||||
|
[repository.upload]
|
||||||
|
TEMP_PATH = /tmp/gitea/uploads
|
||||||
|
|
||||||
|
[server]
|
||||||
|
APP_DATA_PATH = /var/lib/gitea
|
||||||
|
SSH_DOMAIN = git.eryfel.net
|
||||||
|
HTTP_PORT = 3000
|
||||||
|
ROOT_URL = https://git.eryfel.net/
|
||||||
|
DISABLE_SSH = false
|
||||||
|
; In rootless gitea container only internal ssh server is supported
|
||||||
|
START_SSH_SERVER = true
|
||||||
|
SSH_PORT = 2222
|
||||||
|
SSH_LISTEN_PORT = 2222
|
||||||
|
BUILTIN_SSH_SERVER_USER = git
|
||||||
|
LFS_START_SERVER = true
|
||||||
|
DOMAIN = git.eryfel.net
|
||||||
|
LFS_JWT_SECRET = gwue1pMh4qIbeBjwUEyB13wtQ0cFHX2t22VNMTcVoB0
|
||||||
|
OFFLINE_MODE = true
|
||||||
|
|
||||||
|
[database]
|
||||||
|
PATH = /var/lib/gitea/data/gitea.db
|
||||||
|
DB_TYPE = sqlite3
|
||||||
|
HOST = localhost:3306
|
||||||
|
NAME = gitea
|
||||||
|
USER = root
|
||||||
|
PASSWD =
|
||||||
|
SCHEMA =
|
||||||
|
SSL_MODE = disable
|
||||||
|
LOG_SQL = false
|
||||||
|
|
||||||
|
[session]
|
||||||
|
PROVIDER_CONFIG = /var/lib/gitea/data/sessions
|
||||||
|
PROVIDER = file
|
||||||
|
|
||||||
|
[picture]
|
||||||
|
AVATAR_UPLOAD_PATH = /var/lib/gitea/data/avatars
|
||||||
|
REPOSITORY_AVATAR_UPLOAD_PATH = /var/lib/gitea/data/repo-avatars
|
||||||
|
|
||||||
|
[attachment]
|
||||||
|
PATH = /var/lib/gitea/data/attachments
|
||||||
|
|
||||||
|
[log]
|
||||||
|
ROOT_PATH = /var/lib/gitea/data/log
|
||||||
|
MODE = console
|
||||||
|
LEVEL = info
|
||||||
|
|
||||||
|
[security]
|
||||||
|
INSTALL_LOCK = true
|
||||||
|
SECRET_KEY =
|
||||||
|
REVERSE_PROXY_LIMIT = 1
|
||||||
|
REVERSE_PROXY_TRUSTED_PROXIES = *
|
||||||
|
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE3NzQxMzY5NTN9.0dX03FUC3EKjmRKcHpm0IH0bhD4wtk_KXLFQ3sNesgM
|
||||||
|
PASSWORD_HASH_ALGO = pbkdf2
|
||||||
|
|
||||||
|
[service]
|
||||||
|
DISABLE_REGISTRATION = false
|
||||||
|
REQUIRE_SIGNIN_VIEW = false
|
||||||
|
REGISTER_EMAIL_CONFIRM = false
|
||||||
|
ENABLE_NOTIFY_MAIL = false
|
||||||
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
|
||||||
|
ENABLE_CAPTCHA = false
|
||||||
|
DEFAULT_KEEP_EMAIL_PRIVATE = false
|
||||||
|
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
|
||||||
|
DEFAULT_ENABLE_TIMETRACKING = true
|
||||||
|
NO_REPLY_ADDRESS = noreply.localhost
|
||||||
|
|
||||||
|
[lfs]
|
||||||
|
PATH = /var/lib/gitea/git/lfs
|
||||||
|
|
||||||
|
[mailer]
|
||||||
|
ENABLED = false
|
||||||
|
|
||||||
|
[openid]
|
||||||
|
ENABLE_OPENID_SIGNIN = true
|
||||||
|
ENABLE_OPENID_SIGNUP = true
|
||||||
|
|
||||||
|
[cron.update_checker]
|
||||||
|
ENABLED = false
|
||||||
|
|
||||||
|
[repository.pull-request]
|
||||||
|
DEFAULT_MERGE_STYLE = merge
|
||||||
|
|
||||||
|
[repository.signing]
|
||||||
|
DEFAULT_TRUST_MODEL = committer
|
||||||
|
|
||||||
|
[oauth2]
|
||||||
|
JWT_SECRET = RaSq6k_MmyVNrPAaHFk83lCPtDfH2e3bIUCmyJ7Vup0
|
||||||
2
radicale/.env
Normal file
2
radicale/.env
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
UID=1001
|
||||||
|
GID=1001
|
||||||
1
radicale/.gitignore
vendored
Normal file
1
radicale/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
data/
|
||||||
18
radicale/compose.yaml
Normal file
18
radicale/compose.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
services:
|
||||||
|
radicale:
|
||||||
|
image: ghcr.io/kozea/radicale:stable
|
||||||
|
restart: unless-stopped
|
||||||
|
userns_mode: "keep-id"
|
||||||
|
user: "${UID}:${GID}"
|
||||||
|
ports:
|
||||||
|
- 5232:5232
|
||||||
|
volumes:
|
||||||
|
- ./config:/etc/radicale
|
||||||
|
- ./data:/var/lib/radicale:U
|
||||||
|
networks:
|
||||||
|
- eryfel-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
eryfel-net:
|
||||||
|
external: true
|
||||||
|
|
||||||
10
radicale/config/config
Normal file
10
radicale/config/config
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[server]
|
||||||
|
hosts = 0.0.0.0:5232
|
||||||
|
|
||||||
|
[auth]
|
||||||
|
type = htpasswd
|
||||||
|
htpasswd_filename = /etc/radicale/users
|
||||||
|
htpasswd_encryption = bcrypt
|
||||||
|
|
||||||
|
[storage]
|
||||||
|
filesystem_folder = /var/lib/radicale/collections
|
||||||
1
radicale/config/users
Normal file
1
radicale/config/users
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ery:$2y$05$AdVdFlCV2R9/EaHO85dxYuWQKBMhso9siK5lCtuMbP/szoiXhT5X6
|
||||||
Reference in New Issue
Block a user