Building
To compile your application for production, run thebuild command:
cmd/ into build/:
web/ frontend, you should run its production build first, since copper build embeds the build output but does not run the frontend build itself:
--only flag to build specific targets:
Running in Production
Run migrations first, then start the app with your production config:SIGINT and SIGTERM: in-flight requests finish, background goroutines are waited on, and cleanup hooks run, all within a 30-second limit. You should point your process manager’s stop signal at SIGTERM and allow at least that long.
Production Configuration
You should keepconfig/prod.toml free of secrets. Since config files are templates, you may pull secrets from the environment or a secrets manager at startup:
config/prod.toml