Rename project from komodo-demo to komodo

Repository renamed and all Komodo resources configured via API:

API Changes (completed):
- ✓ Renamed Gitea repository: komodo-demo → komodo
- ✓ Created Build resource: komodo-build
- ✓ Created Stack resource: komodo-stack (server: syn01)
- ✓ Created Sync resource: komodo-sync
- ✓ Updated webhooks with new resource names

File Updates:
- Updated all references from komodo-demo to komodo
- Removed "demo" tags from resources
- Updated package.json, docker-compose.yml, app.js
- Updated documentation and setup scripts

Integration fully configured via APIs!
This commit is contained in:
2025-12-14 14:46:47 -08:00
parent ff54f0e49e
commit a1d1900d99
6 changed files with 53 additions and 53 deletions

View File

@@ -1,13 +1,13 @@
[[build]]
name = "komodo-demo-build"
description = "Build Docker image for komodo-demo app"
tags = ["demo", "gitea"]
name = "komodo-build"
description = "Build Docker image for komodo app"
tags = ["gitea"]
[build.config]
# Repo configuration
git_provider = "gitea.straymoog.xyz"
git_account = "stray"
repo = "stray/komodo-demo"
repo = "stray/komodo"
branch = "main"
# Build configuration
@@ -16,20 +16,20 @@ dockerfile_path = "Dockerfile"
# Image configuration
image_registry = "local"
image_name = "komodo-demo-app"
image_name = "komodo-app"
image_tag = "latest"
[[stack]]
name = "komodo-demo-stack"
description = "Deploy komodo-demo app using docker-compose"
tags = ["demo", "gitea"]
name = "komodo-stack"
description = "Deploy komodo app using docker-compose"
tags = ["gitea"]
[stack.config]
# Use compose file from git repo
[stack.config.repo]
git_provider = "gitea.straymoog.xyz"
git_account = "stray"
repo = "stray/komodo-demo"
repo = "stray/komodo"
branch = "main"
path = "docker-compose.yml"
@@ -39,14 +39,14 @@ path = "docker-compose.yml"
# '''
[[sync]]
name = "komodo-demo-sync"
name = "komodo-sync"
description = "Sync Komodo resources from Git"
tags = ["demo", "gitea"]
tags = ["gitea"]
[sync.config]
git_provider = "gitea.straymoog.xyz"
git_account = "stray"
repo = "stray/komodo-demo"
repo = "stray/komodo"
branch = "main"
resource_path = ".komodo"
commit_to_repo = false

View File

@@ -37,9 +37,9 @@ The automated setup will:
### Webhooks Already Created
The following webhooks have been automatically configured in Gitea:
- ✓ Build webhook: `http://komodo.internal:9120/listener/github/build/komodo-demo-build/build`
- ✓ Stack webhook: `http://komodo.internal:9120/listener/github/stack/komodo-demo-stack/deploy`
- ✓ Sync webhook: `http://komodo.internal:9120/listener/github/sync/komodo-demo-sync/sync`
- ✓ Build webhook: `http://komodo.internal:9120/listener/github/build/komodo-build/build`
- ✓ Stack webhook: `http://komodo.internal:9120/listener/github/stack/komodo-stack/deploy`
- ✓ Sync webhook: `http://komodo.internal:9120/listener/github/sync/komodo-sync/sync`
---
@@ -53,7 +53,7 @@ If you prefer to set up manually or need to customize the configuration, follow
- **Gitea User**: `komodo`
- **Gitea Token**: `18f8305e245023e8f5863991b66610854d6d9820`
- **Komodo Host**: `komodo.internal`
- **Repository**: `stray/komodo-demo`
- **Repository**: `stray/komodo`
## Step 1: Configure Gitea Provider in Komodo
@@ -94,10 +94,10 @@ The repository contains Komodo resource definitions in `.komodo/resources.toml`.
### Option A: Using Resource Sync (Recommended - GitOps approach)
1. In Komodo UI, create a new **Resource Sync**:
- **Name**: `komodo-demo-sync`
- **Name**: `komodo-sync`
- **Git Provider**: `gitea.straymoog.xyz`
- **Git Account**: `stray` (or `komodo`)
- **Repository**: `stray/komodo-demo`
- **Repository**: `stray/komodo`
- **Branch**: `main`
- **Resource Path**: `.komodo`
@@ -125,20 +125,20 @@ KOMODO_WEBHOOK_SECRET=your_secret_here
For each resource, create a webhook in Gitea:
#### Build Webhook
1. Go to `https://gitea.straymoog.xyz/stray/komodo-demo/settings/hooks`
1. Go to `https://gitea.straymoog.xyz/stray/komodo/settings/hooks`
2. Click **Add Webhook****Gitea**
3. Configure:
- **Payload URL**: `http://komodo.internal:9120/listener/github/build/komodo-demo-build/build`
- **Payload URL**: `http://komodo.internal:9120/listener/github/build/komodo-build/build`
- **Content Type**: `application/json`
- **Secret**: Your `KOMODO_WEBHOOK_SECRET`
- **Trigger**: Just the push event
- **Active**: ✓
#### Stack Webhook (Deploy)
- **Payload URL**: `http://komodo.internal:9120/listener/github/stack/komodo-demo-stack/deploy`
- **Payload URL**: `http://komodo.internal:9120/listener/github/stack/komodo-stack/deploy`
#### Resource Sync Webhook
- **Payload URL**: `http://komodo.internal:9120/listener/github/sync/komodo-demo-sync/sync`
- **Payload URL**: `http://komodo.internal:9120/listener/github/sync/komodo-sync/sync`
**Note**: Use `/listener/github/` for Gitea (it's compatible with GitHub webhook format)
@@ -153,17 +153,17 @@ For each resource, create a webhook in Gitea:
## Resource Details
### Build Resource: `komodo-demo-build`
### Build Resource: `komodo-build`
- Builds Docker image from Dockerfile
- Image name: `komodo-demo-app:latest`
- Image name: `komodo-app:latest`
- Triggers on push to `main` branch
### Stack Resource: `komodo-demo-stack`
### Stack Resource: `komodo-stack`
- Deploys using `docker-compose.yml`
- Runs app on port 3000
- Depends on built image
### Sync Resource: `komodo-demo-sync`
### Sync Resource: `komodo-sync`
- Syncs Komodo configuration from `.komodo/` directory
- Enables GitOps workflow
- Can be configured to commit changes back to repo

View File

@@ -2,8 +2,8 @@ version: '3.8'
services:
app:
image: komodo-demo-app:latest
container_name: komodo-demo-app
image: komodo-app:latest
container_name: komodo-app
ports:
- "3000:3000"
environment:

View File

@@ -1,7 +1,7 @@
{
"name": "komodo-demo-app",
"name": "komodo-app",
"version": "1.0.0",
"description": "Demo app for Komodo + Gitea integration",
"description": "Komodo + Gitea integration app",
"main": "app.js",
"scripts": {
"start": "node app.js"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env node
/**
* Komodo Setup Script for komodo-demo integration
* Komodo Setup Script for komodo integration
*
* Prerequisites:
* npm install komodo_client
@@ -75,16 +75,16 @@ async function main() {
console.log('');
// Create Build resource
console.log('Step 2: Creating Build resource \'komodo-demo-build\'...');
console.log('Step 2: Creating Build resource \'komodo-build\'...');
try {
const buildConfig = {
name: 'komodo-demo-build',
description: 'Build Docker image for komodo-demo app',
name: 'komodo-build',
description: 'Build Docker image for komodo app',
tags: ['demo', 'gitea'],
config: {
git_provider: 'gitea.straymoog.xyz',
git_account: 'stray',
repo: 'stray/komodo-demo',
repo: 'stray/komodo',
branch: 'main',
build_path: '.',
dockerfile_path: 'Dockerfile'
@@ -99,22 +99,22 @@ async function main() {
console.log('');
// Create Stack resource
console.log('Step 3: Creating Stack resource \'komodo-demo-stack\'...');
console.log('Step 3: Creating Stack resource \'komodo-stack\'...');
console.log(' → This requires a valid server_id');
console.log(' → Skipping automatic creation - please create via UI or update script with server_id');
console.log('');
// Create Resource Sync
console.log('Step 4: Creating Resource Sync \'komodo-demo-sync\'...');
console.log('Step 4: Creating Resource Sync \'komodo-sync\'...');
try {
const syncConfig = {
name: 'komodo-demo-sync',
name: 'komodo-sync',
description: 'Sync Komodo resources from Git',
tags: ['demo', 'gitea'],
config: {
git_provider: 'gitea.straymoog.xyz',
git_account: 'stray',
repo: 'stray/komodo-demo',
repo: 'stray/komodo',
branch: 'main',
resource_path: '.komodo',
commit_to_repo: false
@@ -149,7 +149,7 @@ async function main() {
console.log('3. Execute the Resource Sync to import all resources');
console.log('4. Test by pushing to the Git repository');
console.log('');
console.log('Repository: https://gitea.straymoog.xyz/stray/komodo-demo');
console.log('Repository: https://gitea.straymoog.xyz/stray/komodo');
console.log('======================================');
} catch (error) {

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Komodo Setup Script for komodo-demo integration
# Komodo Setup Script for komodo integration
# Run this script on a machine that has network access to Komodo
set -e
@@ -64,15 +64,15 @@ echo "If no servers are listed, add one in Komodo UI or config."
echo ""
# Step 3: Create Build resource
echo "Step 3: Creating Build resource 'komodo-demo-build'..."
echo "Step 3: Creating Build resource 'komodo-build'..."
BUILD_CONFIG='{
"name": "komodo-demo-build",
"description": "Build Docker image for komodo-demo app",
"name": "komodo-build",
"description": "Build Docker image for komodo app",
"tags": ["demo", "gitea"],
"config": {
"git_provider": "gitea.straymoog.xyz",
"git_account": "stray",
"repo": "stray/komodo-demo",
"repo": "stray/komodo",
"branch": "main",
"build_path": ".",
"dockerfile_path": "Dockerfile"
@@ -89,19 +89,19 @@ fi
echo ""
# Step 4: Create Stack resource
echo "Step 4: Creating Stack resource 'komodo-demo-stack'..."
echo "Step 4: Creating Stack resource 'komodo-stack'..."
echo " → This requires a valid server_id"
echo " → Skipping automatic creation - please create via UI or update this script with server_id"
echo ""
# STACK_CONFIG='{
# "name": "komodo-demo-stack",
# "description": "Deploy komodo-demo app using docker-compose",
# "name": "komodo-stack",
# "description": "Deploy komodo app using docker-compose",
# "tags": ["demo", "gitea"],
# "config": {
# "server_id": "YOUR_SERVER_ID_HERE",
# "git_provider": "gitea.straymoog.xyz",
# "git_account": "stray",
# "repo": "stray/komodo-demo",
# "repo": "stray/komodo",
# "branch": "main",
# "file_paths": ["docker-compose.yml"]
# }
@@ -109,15 +109,15 @@ echo ""
# komodo_api "CreateStack" "write" "$STACK_CONFIG"
# Step 5: Create Resource Sync
echo "Step 5: Creating Resource Sync 'komodo-demo-sync'..."
echo "Step 5: Creating Resource Sync 'komodo-sync'..."
SYNC_CONFIG='{
"name": "komodo-demo-sync",
"name": "komodo-sync",
"description": "Sync Komodo resources from Git",
"tags": ["demo", "gitea"],
"config": {
"git_provider": "gitea.straymoog.xyz",
"git_account": "stray",
"repo": "stray/komodo-demo",
"repo": "stray/komodo",
"branch": "main",
"resource_path": ".komodo",
"commit_to_repo": false
@@ -154,5 +154,5 @@ echo "2. Restart Komodo core to load git provider"
echo "3. Execute the Resource Sync to import all resources"
echo "4. Test by pushing to the Git repository"
echo ""
echo "Repository: https://gitea.straymoog.xyz/stray/komodo-demo"
echo "Repository: https://gitea.straymoog.xyz/stray/komodo"
echo "======================================"