- Linux host (recommended)
- Docker 20.10+ (if using container deployment)
- MySQL and Redis accessible from the service
bin/configs/prod.jsonprepared
Create production config from template:
cp bin/configs/local.json.default bin/configs/prod.jsonbin/configs/prod.json is only a template. Replace all placeholder values before deployment.
Startup now fails fast when enabled database or Redis entries still use template placeholders or omit required connection fields.
Key fields to review in bin/configs/prod.json:
system.run_mode(release)system.http_portsystem.jwt_secretsystem.admin.jwt_secret(recommended; falls back tosystem.jwt_secretwhen empty)system.route_prefixdatabases[*]redis[*]log
RUN_ENV=prodto loadbin/configs/prod.jsonAPP_NAMEoptional runtime override
Example:
export RUN_ENV=prod
export APP_NAME=dudu-admin-apimake build
RUN_ENV=prod ./bin/dudu-admin-apiRecommended process managers:
systemdsupervisord- container orchestrator runtime
Build image:
make docker-buildThe repository now uses .dockerignore to exclude local configs, temporary artifacts, and local workspace metadata from the Docker build context.
Run container:
RUN_ENV=prod make docker-runThis uses Makefile defaults:
- container name:
dudu-admin-api - config mount:
${PWD}/bin/configs:/bin/configs - port:
8080:8080
This repository does not provide a committed docker-compose.yml by default.
If your team uses Compose, create a local compose file and keep it in your infra repository or local ops directory.
Public health endpoint:
API_PREFIX="${API_PREFIX:-dudu-admin-api}"
curl -i "http://127.0.0.1:8080/${API_PREFIX}/external/ping"Internal health endpoint:
API_PREFIX="${API_PREFIX:-dudu-admin-api}"
curl -i "http://127.0.0.1:8080/${API_PREFIX}/internal/ping"If system.route_prefix is customized, export API_PREFIX with that effective value before running the commands.
- Enable file logging via
log.driver=fileandlog.path - Keep operation records enabled for admin routes (
SaveOperationRecord) - Configure
monitor.panic_robotandnotifychannels for panic alerts
- Use strong values for
system.jwt_secretand admin OAuth/passkey related secrets - Restrict MySQL/Redis network exposure
- Protect config files and logs with proper OS permissions
- Ensure sensitive payloads are redacted or omitted in operation logs
- Database backup (daily + retention policy)
bin/configsbackup with version control in secure private storage- Restore drill in staging before production rollout