Add TCP/UDP port mapping support
- Add app_ports table for storing port mappings per app - Add Port model with CRUD operations - Add handlers for adding/deleting port mappings - Add ports section to app detail template - Update Docker client to configure port bindings when creating containers - Support both TCP and UDP protocols
This commit is contained in:
@@ -96,6 +96,11 @@ func (a *App) GetVolumes(ctx context.Context) ([]*Volume, error) {
|
||||
return FindVolumesByAppID(ctx, a.db, a.ID)
|
||||
}
|
||||
|
||||
// GetPorts returns all port mappings for this app.
|
||||
func (a *App) GetPorts(ctx context.Context) ([]*Port, error) {
|
||||
return FindPortsByAppID(ctx, a.db, a.ID)
|
||||
}
|
||||
|
||||
// GetDeployments returns recent deployments for this app.
|
||||
func (a *App) GetDeployments(ctx context.Context, limit int) ([]*Deployment, error) {
|
||||
return FindDeploymentsByAppID(ctx, a.db, a.ID, limit)
|
||||
|
||||
Reference in New Issue
Block a user