diff --git a/src/templates/prod.json b/src/templates/prod.json new file mode 100644 index 0000000..1a72941 --- /dev/null +++ b/src/templates/prod.json @@ -0,0 +1,148 @@ +{ + "name": "prod", + "displayName": "Production Monitoring", + "description": "Production environment monitoring and management layout", + "variables": [ + { + "name": "ENVIRONMENT", + "description": "Production environment name", + "defaultValue": "production", + "required": true + }, + { + "name": "SERVER_HOST", + "description": "Server hostname", + "defaultValue": "prod.example.com", + "required": true + }, + { + "name": "SSH_USER", + "description": "SSH username", + "defaultValue": "admin", + "required": false + } + ], + "layout": { + "version": "1.0.0", + "terminalType": "tmux", + "createdAt": "2024-01-01T00:00:00.000Z", + "updatedAt": "2024-01-01T00:00:00.000Z", + "session": { + "id": "s-prod", + "name": "prod", + "windows": [ + { + "id": "w0", + "index": 0, + "name": "monitoring", + "panes": [ + { + "id": "p0", + "index": 0, + "layout": { + "x": 0, + "y": 0, + "width": 50, + "height": 24 + }, + "command": "ssh ${SSH_USER}@${SERVER_HOST} 'htop'", + "cwd": "~", + "title": "System Load" + }, + { + "id": "p1", + "index": 1, + "layout": { + "x": 50, + "y": 0, + "width": 50, + "height": 24 + }, + "command": "ssh ${SSH_USER}@${SERVER_HOST} 'docker stats --no-stream'", + "cwd": "~", + "title": "Docker Stats" + } + ] + }, + { + "id": "w1", + "index": 1, + "name": "logs", + "panes": [ + { + "id": "p0", + "index": 0, + "layout": { + "x": 0, + "y": 0, + "width": 100, + "height": 24 + }, + "command": "ssh ${SSH_USER}@${SERVER_HOST} 'tail -f /var/log/nginx/access.log'", + "cwd": "~", + "title": "Nginx Logs" + } + ] + }, + { + "id": "w2", + "index": 2, + "name": "deploy", + "panes": [ + { + "id": "p0", + "index": 0, + "layout": { + "x": 0, + "y": 0, + "width": 50, + "height": 24 + }, + "command": "ssh ${SSH_USER}@${SERVER_HOST} 'cd /opt/${ENVIRONMENT} && git pull'", + "cwd": "~", + "title": "Git Pull" + }, + { + "id": "p1", + "index": 1, + "layout": { + "x": 50, + "y": 0, + "width": 50, + "height": 24 + }, + "command": "ssh ${SSH_USER}@${SERVER_HOST} 'pm2 restart all'", + "cwd": "~", + "title": "PM2 Restart" + } + ] + }, + { + "id": "w3", + "index": 3, + "name": "emergency", + "panes": [ + { + "id": "p0", + "index": 0, + "layout": { + "x": 0, + "y": 0, + "width": 100, + "height": 24 + }, + "command": "ssh ${SSH_USER}@${SERVER_HOST}", + "cwd": "~", + "title": "SSH Connection" + } + ] + } + ], + "activeWindowIndex": 0 + }, + "metadata": { + "description": "Production monitoring setup", + "tags": ["production", "monitoring", "ops"] + } + } +}