Applications Overview
Applications are the core workloads you deploy and run on the Thevenin platform. This guide explains the fundamental concepts and how applications work within environments.
What are Applications?
In Thevenin, an application is a containerized workload deployed within an environment. Applications run from Docker images and can be configured with:
- Container images
- Resource allocations (CPU and memory)
- Environment variables
- Persistent volumes
- Port mappings
- Configuration files
Key Concepts
Container Images
Thevenin applications run from container images. You specify:
- Image Name: The Docker Hub image (e.g.,
nginx,postgres,node) - Tag: The specific version (e.g.,
latest,14,18-alpine)
Format: image:tag
Examples:
nginx:latest- Latest NGINX web serverpostgres:14- PostgreSQL version 14redis:alpine- Redis with Alpine Linuxnode:18-alpine- Node.js 18 on Alpine
Resource Management
Each application is allocated specific resources within an environment:
CPU Allocation
- Measured in cores or millicores
- Example:
0.5cores,1core,2cores - Limits how much processing power the application can use
Memory Allocation
- Measured in MB or GB
- Example:
512 MB,1 GB,2 GB - Prevents applications from using excessive memory
Environments and Applications
Applications always run within environments:
- Environment First: Create an environment before deploying applications
- Isolated Resources: Each environment has its own resource pool
- Multiple Applications: An environment can host multiple applications
Example Workflow:
1. Create "Production" environment (4 cores, 8 GB memory)
2. Deploy "web-app" application (1 core, 1 GB)
3. Deploy "api-service" application (1 core, 1 GB)
4. Deploy "redis-cache" application (0.5 cores, 512 MB)
Application Components
Ports and Networking
Applications can expose ports for network communication:
Container Port: The port your application listens on inside the container
- Example: Web servers typically use port
80or8080 - Example: Databases use specific ports (
5432for PostgreSQL,3306for MySQL)
Protocol: HTTP, GRPC,TCP or UDP
- Use HTTP or GRPC over TCP to get Application Layer features. Examples: web services, APIs
- Use TCP if your application doesn't support HTTP or GRPC. Examples Databases, SSH, SFTP, Brokers, Caches
- Some real-time services use UDP . Examples: game servers. live video streaming. DNS, Voice over IP (VoIP).
Exposing UDP plublicly is not yet supported Exposing Layer 4 TCP plublicly is a feature still in progress Exposing HTTP and GRPC plublicly is fully supported and done on port 443
Environment Variables
Configure your application using variable set:
DATABASE_URL=postgresql://host:5432/db
NODE_ENV=production
PORT=3000
Variable Sets are reusable collections of variables. Can be shared across multiple applications or deleted with the application. See Variable Sets
Persistent Storage
Applications can use volumes for data that persists beyond the container lifecycle:
Use Cases:
- Database data storage
- User uploaded files
- Application logs
- Configuration that changes at runtime
See Volumes for more information.
Application Files
Add custom files to your application:
Common Uses:
- Configuration files (
config.yaml,settings.json) - SSL certificates
- Application-specific scripts
- Static assets
Common Application Patterns
Thevenin can be used to setup different Applications Patterns, which are include but are not limited to:
Stateless Applications
Applications that don't store data locally:
Examples:
- Web frontends
- API services
- Proxies and load balancers
Characteristics:
- No persistent volumes needed
- Can be restarted without data loss
Stateful Applications
Applications that manage persistent data:
Examples:
- Databases (PostgreSQL, MySQL, MongoDB)
- Message queues (RabbitMQ, Redis)
- File storage services
Characteristics:
- Require persistent volumes
- Restart requires data preservation
Worker Applications
Background processing applications:
Examples:
- Job queues
- Data processing pipelines
- Scheduled tasks
Characteristics:
- May not expose ports
- Often use message queues
- Run continuously or on schedules
Best Practices
Image Selection
✅ Do:
- Use official images when possible (
nginx,postgres,redis) - Specify exact version tags (
14notlatest) - Use Alpine variants for smaller sizes (
18-alpine) - Test images in development before production
❌ Don't:
- Use
:latesttag in production - Use untrusted or unmaintained images
Resource Planning
✅ Do:
- Start with minimal resources
- Monitor actual usage
❌ Don't:
- Over-provision unnecessarily
- Under-provision critical services
Configuration Management
✅ Do:
- Use environment variables for configuration
- Leverage variable sets for reusable config
- Keep secrets in variable sets, not code
- Document required variables
❌ Don't:
- Hardcode configuration in images
- Use same config for all environments
- Leave variables undocumented
- Commit secrets to version control
Security
✅ Do:
- Use specific, tested image versions
- Keep images up to date
❌ Don't:
- Run containers as root if avoidable
- Expose unnecessary ports
- Use default passwords
Next Steps
Now that you understand applications, learn how to:
- Create Applications - Deploy your first application
- Manage Environments - Organize your applications
- Configure Attachments - Set up volumes and variables
Getting Help
If you encounter issues:
- Check the Creating Applications troubleshooting section
- Review application logs in the dashboard
- Verify resource allocations are sufficient
- Contact support through the dashboard