Add Kener installation script - #1432
Conversation
Initial script for Kener setup and update functionality.
This script installs Kener in a ProxmoxVE container, setting up Docker and the necessary environment.
Added JSON configuration for Kener monitoring platform.
Greptile OverviewGreptile SummaryThis PR adds a complete Kener installation script set for ProxmoxVE LXC containers. Kener is deployed via Docker Compose with PostgreSQL as the database backend. The implementation includes all three required files ( Key changes:
Issues found:
All issues are non-critical style/consistency violations that should be fixed for project compliance. Confidence Score: 4/5
Important Files Changed
|
| update_os | ||
|
|
||
| msg_info "Installing base dependencies" | ||
| $STD apt update |
There was a problem hiding this comment.
Use apt instead of apt update for consistency
| $STD apt update | |
| $STD apt update |
Context Used: Rule from dashboard - What: Use apt instead of apt-get in scripts and documentation.
Why: apt provides a stable CLI... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| $STD apt update | ||
| $STD apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
There was a problem hiding this comment.
Use apt instead of apt-get for consistency
| $STD apt update | |
| $STD apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | |
| $STD apt update | |
| $STD apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
Context Used: Rule from dashboard - What: Use apt instead of apt-get in scripts and documentation.
Why: apt provides a stable CLI... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| cat <<EOF > /etc/apt/sources.list.d/docker.sources | ||
| Types: deb | ||
| URIs: https://download.docker.com/linux/debian | ||
| Suites: bookworm | ||
| Components: stable | ||
| Signed-By: /etc/apt/keyrings/docker.asc | ||
| EOF |
There was a problem hiding this comment.
Heredoc delimiter should come before the output redirection
| cat <<EOF > /etc/apt/sources.list.d/docker.sources | |
| Types: deb | |
| URIs: https://download.docker.com/linux/debian | |
| Suites: bookworm | |
| Components: stable | |
| Signed-By: /etc/apt/keyrings/docker.asc | |
| EOF | |
| cat <<EOF > /etc/apt/sources.list.d/docker.sources | |
| Types: deb | |
| URIs: https://download.docker.com/linux/debian | |
| Suites: bookworm | |
| Components: stable | |
| Signed-By: /etc/apt/keyrings/docker.asc | |
| EOF |
Context Used: Rule from dashboard - What: Heredoc syntax must come before the output redirection in cat commands.
Why: Placing the here... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| cat <<EOF > /opt/kener/.env | ||
| KENER_SECRET_KEY=$(openssl rand -hex 32) | ||
| POSTGRES_USER=kener | ||
| POSTGRES_PASSWORD=$(openssl rand -hex 16) | ||
| POSTGRES_DB=kener | ||
| EOF |
There was a problem hiding this comment.
Heredoc delimiter should come before the output redirection
Context Used: Rule from dashboard - What: Heredoc syntax must come before the output redirection in cat commands.
Why: Placing the here... (source)
| cat <<EOF > /opt/kener/docker-compose.yaml | ||
| version: "3.8" | ||
|
|
||
| services: | ||
| kener: | ||
| image: rajnandan1/kener:latest | ||
| container_name: kener | ||
| environment: | ||
| ORIGIN: http://${HOST_IP}:3000 | ||
| TZ: Europe/Prague | ||
| KENER_SECRET_KEY: \${KENER_SECRET_KEY} | ||
| DATABASE_URL: postgresql://\${POSTGRES_USER}:\${POSTGRES_PASSWORD}@postgres:5432/\${POSTGRES_DB} | ||
| ports: | ||
| - "3000:3000" | ||
| volumes: | ||
| - ./uploads:/app/uploads | ||
| depends_on: | ||
| postgres: | ||
| condition: service_healthy | ||
| restart: unless-stopped | ||
|
|
||
| postgres: | ||
| image: postgres:alpine | ||
| container_name: postgres | ||
| environment: | ||
| POSTGRES_USER: \${POSTGRES_USER} | ||
| POSTGRES_PASSWORD: \${POSTGRES_PASSWORD} | ||
| POSTGRES_DB: \${POSTGRES_DB} | ||
| volumes: | ||
| - pgdata:/var/lib/postgresql/data | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "pg_isready -U \${POSTGRES_USER} -d \${POSTGRES_DB}"] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 5 | ||
| restart: unless-stopped | ||
|
|
||
| volumes: | ||
| pgdata: | ||
| name: kener_postgres | ||
| EOF |
There was a problem hiding this comment.
Heredoc delimiter should come before the output redirection
Context Used: Rule from dashboard - What: Heredoc syntax must come before the output redirection in cat commands.
Why: Placing the here... (source)
| cat <<EOF > /etc/apt/sources.list.d/docker.sources | ||
| Types: deb | ||
| URIs: https://download.docker.com/linux/debian | ||
| Suites: bookworm |
There was a problem hiding this comment.
Hardcoded bookworm suite should use dynamic OS codename to support different Debian versions. Consider using $(lsb_release -cs) instead
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
Like all Scripts. Bare Metal only, No docker. Build from source. |
✍️ Description
Added a fully functional Kener installation script for ProxmoxVE LXC containers in Docker. The script installs Docker, creates the required folder structure, generates a
.envfile with secret keys, sets up PostgreSQL, creates a Docker Compose file for Kener, and starts the containers.✅ Prerequisites
🛠️ Type of Change
README,AppName.md,CONTRIBUTING.md, or other docs.🔍 Code & Security Review
Code_Audit.md&CONTRIBUTING.mdguidelinesAppName.sh,AppName-install.sh,AppName.json)📋 Images
📦 Application Requirements