Deploy a web application with a database and prepare its release and operating processes. This guide uses a service named web and a database named db.
You will need the following to get started:
- Application source or a container image that starts your web server
- A Northflank project and permission to create its resources
- The application port, database type, and required environment variables
1. Prepare the database and secrets
Deploy a database named db. Choose a database type and version that the application supports.
Prepare a secret group with the application's required variables. Link the database credentials and match the variable names that the application reads.
2. Build and deploy the application
If you use source code, build and deploy your code. If you already have an image, deploy it from a registry.
Name the service web. Select the secret group and use the application's start command and port. Wait for the deployment to start. If it fails, examine the container logs.
Make sure that web can connect to db. Use a test request that reads and writes application data.
3. Configure traffic and readiness
Configure the service port. If you use a custom domain, add the domain and link it to the port.
Configure health checks for the application. Make sure that a request to its public address returns the expected response.
4. Define the release process
Use environments to define development stages. For releases with multiple actions, configure a workflow.
If a release changes the database schema, review database migrations before deployment. Define recovery for both the application image and its data. Reverting an image does not reverse a database migration.
5. Prepare for operations
- Choose service capacity and instance count.
- Configure database backups and review the restore procedure.
- Review metrics and configure infrastructure alerts.
- Make sure that the team can find logs, identify the deployed revision, and use the recovery procedure.
For more detail, read the production readiness guidance. The application is ready for your production review when it serves requests, stores data, and has defined release and recovery processes.