Applications
Applications are the building blocks of your software. They represent individual components like your own microservices or external tools like databases and message brokers.
What is an Application?
An application in Hydra Deploy is a distinguishable software package that can be deployed. Examples include:
- A Node.js backend service
- A React frontend
- A Python API
- A database like PostgreSQL or MongoDB
- A message broker like RabbitMQ or Redis
Each application can have multiple versions and can be used in multiple projects.
Creating an Application
- Go to Applications in the navigation menu
- Click on Create New App (or click on the “Add Application” card)
- Fill in the following information:
- Name - A unique name for the application (e.g., “User Service”)
- Code - A unique code for identification (auto-generated based on name)
- Description - An optional description of what the application does
- Optionally upload an image or icon
- Click on Create
Application Overview
After creating, you see the application in the list. Each application card shows:
- Application Name - The name of the application
- Latest Version - The most recent version available
- Last Updated - When the application was last updated
- Connected Projects - The number of projects where this application is used
Application Details
Click on an application to go to its detail page. Here you find multiple tabs:
Overview
The overview tab shows a summary of the application:
- Basic information (name, code, description)
- Latest version
- Overview of used projects and environments
Versions
Manage all versions of your application.
Creating a New Version:
- Go to the Versions tab
- Click on Create Version
- Enter the version number (e.g., “v1.2.0” or “1.2.0”)
- The version is added
Viewing Versions:
- All versions are displayed in a list
- See when each version was created
- View in which projects and environments each version is deployed
Best Practice: Ideally create versions automatically via the API in your CI/CD pipeline to minimize errors.
Configurations
Define the configuration structures for your application.
Configuration Files:
- Go to the Configurations tab
- Click on Add Config File
- Give the file a name (e.g.,
appsettings.jsonorconfig.env) - Select the type (JSON, XML, DOTENV, or TXT)
- Enter the base configuration
Supported Formats:
- JSON - For structured configurations (will be merged)
- XML - For XML configurations (will be merged)
- DOTENV - For environment variables (will be merged)
- TXT - For plain text (not merged)
Config Merge: If you define a base config at application level, you can create project-specific overrides. During deployment, these will be merged.
Example: Base config:
{
"database": {
"host": "localhost",
"port": 5432
},
"logging": {
"level": "info"
}
}Project override:
{
"database": {
"host": "production-db.example.com"
}
}Result after merge:
{
"database": {
"host": "production-db.example.com",
"port": 5432
},
"logging": {
"level": "info"
}
}Deploy Script
The deploy script defines how your application is installed and started on the server.
Creating a Deploy Script:
- Go to the Deploy Script tab
- Write your deployment script:
- Linux: use Bash (
.sh) - Windows: use PowerShell (
.ps1)
- Linux: use Bash (
- Save the script
Example Bash Script:
#!/bin/bash
# Navigate to the application directory
cd /opt/my-app
# Download the new version
wget https://releases.example.com/my-app/$VERSION.tar.gz
# Stop the current application
systemctl stop my-app
# Extract the new version
tar -xzf $VERSION.tar.gz
rm $VERSION.tar.gz
# Start the application
systemctl start my-appAvailable Variables: In your script, you have access to variables like:
$VERSION- The version being deployed$APP_NAME- The name of the application$PROJECT_NAME- The name of the project$ENVIRONMENT_NAME- The name of the environment
Settings
Manage general application settings:
- Edit application name
- Change description
- Update image or icon
- Delete application
Deleting Application: Note: if you delete an application, all versions, configurations, and deployment history will also be deleted.
Deployment Steps
For complex applications, you can define deployment steps that describe the different steps of a deployment.
Using Deployment Steps:
- Go to the Deployment Steps tab
- Create templates for common deployment steps
- Or create custom deployment steps for your specific use case
- Attach the steps to your application
Deployment steps are executed in the order they are defined. For more information on deployment steps, see the Deployment Steps documentation.
Searching Applications
Use the search bar at the top of the applications page to quickly find applications:
- Type a part of the application name
- Results are filtered in real-time
Best Practices
Version Management
- Use semantic versioning (MAJOR.MINOR.PATCH)
- Create new versions automatically in your CI/CD pipeline
- Document what has changed between versions
Configuration
- Define only base configurations at application level
- Use project-specific overrides for environment differences
- Use environment variables for sensitive data (passwords, API keys)
Deployment Scripts
- Make scripts idempotent (can run multiple times without causing damage)
- Add error handling
- Log important steps for debugging
Organization
- Use clear, descriptive names
- Group related applications in the same projects
- Keep the application list clean by deleting unused applications