10 Deploy your application

This chapter covers

  • Setting up your application to read environment variables
  • Optimizing your built binary for production
  • Cross-compiling your service to various operating systems
  • Creating a more complex build process before releasing your code
  • Creating optimized Docker files
  • Setting up a local Docker environment with Docker Compose

After adding authentication and authorization in chapter 9, we can shift gears and leave writing business logic behind. At this stage, all code is written and done, and it is time to show the world what we built. The compiler doesn’t just help us greatly in creating a solid codebase; it also shines when shipping your code to production—for example, cross-compiling the binary for various ...

Get Rust Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.