第 0 阶段:项目初始化

This commit is contained in:
yml
2026-05-22 15:05:28 +08:00
commit 8e7f1f17f0
55 changed files with 4519 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
services:
mysql:
image: mysql:8.4
container_name: hfb-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: rootsecret
MYSQL_DATABASE: hfb_sys
MYSQL_USER: hfb
MYSQL_PASSWORD: secret
TZ: Asia/Shanghai
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-prootsecret"]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:7.4-alpine
container_name: hfb-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 10
minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
container_name: hfb-minio
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
TZ: Asia/Shanghai
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 5s
retries: 10
volumes:
mysql_data:
redis_data:
minio_data:
+19
View File
@@ -0,0 +1,19 @@
services:
backend:
build:
context: ../backend
restart: unless-stopped
env_file:
- ../backend/.env
ports:
- "8080:8080"
frontend:
build:
context: ..
dockerfile: frontend/Dockerfile
restart: unless-stopped
depends_on:
- backend
ports:
- "80:80"
+24
View File
@@ -0,0 +1,24 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://backend:8080/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /health {
proxy_pass http://backend:8080/health;
proxy_set_header Host $host;
}
}