Files
photography/backend-old/configs/config.yaml
xujiang 604b9e59ba fix
2025-07-10 18:09:11 +08:00

76 lines
1.5 KiB
YAML

app:
name: "photography-backend"
version: "1.0.0"
environment: "development"
port: 8080
debug: true
database:
host: "localhost"
port: 5432
username: "postgres"
password: "password"
database: "photography"
ssl_mode: "disable"
max_open_conns: 100
max_idle_conns: 10
conn_max_lifetime: 300
redis:
host: "localhost"
port: 6379
password: ""
database: 0
pool_size: 100
min_idle_conns: 10
jwt:
secret: "your-secret-key-change-in-production"
expires_in: "24h"
refresh_expires_in: "168h"
storage:
type: "local" # local, s3, minio
local:
base_path: "./uploads"
base_url: "http://localhost:8080/uploads"
s3:
region: "us-east-1"
bucket: "photography-uploads"
access_key: ""
secret_key: ""
endpoint: ""
upload:
max_file_size: 52428800 # 50MB
allowed_types: ["image/jpeg", "image/png", "image/gif", "image/webp", "image/tiff"]
thumbnail_sizes:
- name: "small"
width: 300
height: 300
- name: "medium"
width: 800
height: 600
- name: "large"
width: 1200
height: 900
logger:
level: "debug"
format: "json"
output: "file"
filename: "logs/app.log"
max_size: 100
max_age: 7
compress: true
cors:
allowed_origins: ["http://localhost:3000", "https://photography.iriver.top"]
allowed_methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
allowed_headers: ["Origin", "Content-Length", "Content-Type", "Authorization"]
allow_credentials: true
rate_limit:
enabled: true
requests_per_minute: 100
burst: 50