Skip to content

Commit ba868e2

Browse files
committed
📈 初步编写了用于调试的本地临时集群配置,都是缓存容器。
1 parent d063267 commit ba868e2

File tree

9 files changed

+322
-89
lines changed

9 files changed

+322
-89
lines changed

Cargo.lock

Lines changed: 194 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,18 @@ reqwest = { version = "^0.12", features = [
8080
"json",
8181
"multipart",
8282
] }
83+
tower-http = { version = "^0.6", features = ["fs", "trace"] }
84+
8385
sea-orm = { version = "^1", features = [
8486
"debug-print",
8587
"json-array",
8688
"sqlx-postgres",
8789
"runtime-tokio-rustls",
8890
] }
89-
tower-http = { version = "^0.6", features = ["fs", "trace"] }
91+
redis = { version = "^0.32", features = [
92+
"tokio-comp",
93+
"ahash",
94+
"uuid",
95+
"json",
96+
] }
97+
minio = "^0.3"

Compose.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
services:
2+
redis:
3+
image: redis:latest
4+
container_name: test-redis
5+
ports:
6+
- "6379:6379"
7+
environment:
8+
REDIS_PORT: 6379
9+
restart: unless-stopped
10+
11+
minio:
12+
image: minio/minio:latest
13+
container_name: test-minio
14+
ports:
15+
- "9000:9000"
16+
- "9001:9001"
17+
environment:
18+
MINIO_ROOT_USER: genshin_cloud
19+
MINIO_ROOT_PASSWORD: genshin_cloud
20+
MINIO_BUCKET_IMAGE: images
21+
MINIO_KEY: KYJG_UPLOAD_KEY
22+
MINIO_SECRET: KYJG_UPLOAD_SECRET
23+
MINIO_IMG2WEBP_TZ: Asia/Shanghai
24+
MINIO_IMG2WEBP_QUALITY: 80
25+
MINIO_IMG2WEBP_MODE: 0
26+
command: server /data --console-address ":9001"
27+
volumes:
28+
- minio-data:/data
29+
restart: unless-stopped
30+
31+
# alist:
32+
# image: xhofe/alist:latest
33+
# container_name: test-alist
34+
# ports:
35+
# - "5244:5244"
36+
# volumes:
37+
# - alist-data:/data
38+
# restart: unless-stopped
39+
40+
volumes:
41+
minio-data:
42+
alist-data:

Makefile.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ exec docker build -t kongying-tavern-backend .
1010
'''
1111

1212
[tasks.dev]
13-
env = { DB_HOST = "ddns.minemc.top", DB_PORT = "13432", DB_USERNAME = "genshin_map", DB_DATABASE = "genshin_map" }
1413
env_files = ["./.env"] # 密码需要自行创建 .env 文件,并写入 DB_PASSWORD 变量,仓库本身不保存也不能保存任何密码
1514
watch = { no_git_ignore = true, ignore_pattern = "Cargo.lock", watch = [
1615
"./packages/",
@@ -20,3 +19,12 @@ script = '''
2019
2120
exec cargo run
2221
'''
22+
23+
[tasks.dev.env]
24+
DB_HOST = "ddns.minemc.top"
25+
DB_PORT = "13432"
26+
DB_USERNAME = "genshin_map"
27+
DB_DATABASE = "genshin_map"
28+
29+
MINIO_KEY = "KYJG_UPLOAD_KEY"
30+
MINIO_SECRET = "KYJG_UPLOAD_SECRET"

0 commit comments

Comments
 (0)