Skip to content

[WIP] Add installation scripts for Odoo, Shopify CLI, Contentful CLI, Strapi, and React Bricks CMS#4

Merged
nexusct merged 2 commits intodev-v2from
copilot/add-install-scripts-for-applications
Mar 23, 2026
Merged

[WIP] Add installation scripts for Odoo, Shopify CLI, Contentful CLI, Strapi, and React Bricks CMS#4
nexusct merged 2 commits intodev-v2from
copilot/add-install-scripts-for-applications

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 23, 2026

  • Create ci/install_odoo.sh (Docker-based default, deb/rpm fallback; Docker network instead of deprecated --link; credentials persisted to file)
  • Create ci/install_shopify.sh (npm install -g @shopify/cli@latest)
  • Create ci/install_contentful.sh (npm install -g contentful-cli)
  • Create ci/install_strapi.sh (npx create-strapi@latest with --quickstart)
  • Create ci/install_react_bricks.sh (npx create-reactbricks-app@latest)
  • Update ci/script.sh to chmod +x all installer scripts
Original prompt

Overview

Add individual installation scripts for 5 applications/platforms to the ci/ directory of the repository:

  1. Odoo — Open-source ERP/CRM (Docker-based installation)
  2. Shopify CLI — Shopify development CLI (@shopify/cli via npm)
  3. Contentful CLI — Headless CMS CLI (contentful-cli via npm)
  4. Strapi — Open-source headless CMS (project scaffolder via npx create-strapi@latest)
  5. React Bricks CMS — Visual headless CMS for React (npx create-reactbricks-app@latest)

Also update ci/script.sh to make all new installer scripts executable.


Files to Create

ci/install_odoo.sh

Odoo is best installed via Docker (official Docker image) or via the official Odoo nightly packages. This script should support both paths, defaulting to Docker.

#!/bin/bash
# Odoo Installer
# Supports: Docker (default) or native deb/rpm package install

set -e

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
NC='\033[0m'

ODOO_VERSION="${ODOO_VERSION:-17}"
ODOO_PORT="${ODOO_PORT:-8069}"
DB_PASSWORD="${ODOO_DB_PASSWORD:-odoo_$(cat /dev/urandom | head -c 8 | md5sum | head -c 12)}"
INSTALL_DIR="${ODOO_INSTALL_DIR:-/opt/odoo}"

log_info()  { echo -e "${BLUE}[Odoo] $1${NC}"; }
log_ok()    { echo -e "${GREEN}[Odoo] $1${NC}"; }
log_warn()  { echo -e "${YELLOW}[Odoo] $1${NC}"; }
log_err()   { echo -e "${RED}[Odoo] $1${NC}"; }

check_docker() {
    if ! command -v docker >/dev/null 2>&1; then
        log_err "Docker is not installed. Please install Docker first (the 1Panel installer handles this)."
        return 1
    fi
    log_ok "Docker detected: $(docker --version)"
}

install_odoo_docker() {
    log_info "Installing Odoo ${ODOO_VERSION} via Docker..."

    if docker ps -a --format '{{.Names}}' | grep -q '^odoo$'; then
        log_warn "Odoo container already exists. Skipping."
        return 0
    fi

    # Create data directories
    mkdir -p "${INSTALL_DIR}/data" "${INSTALL_DIR}/config" "${INSTALL_DIR}/addons"

    # Start PostgreSQL container for Odoo
    if ! docker ps -a --format '{{.Names}}' | grep -q '^odoo-db$'; then
        log_info "Starting PostgreSQL container for Odoo..."
        docker run -d \
            --name odoo-db \
            --restart unless-stopped \
            -e POSTGRES_DB=postgres \
            -e POSTGRES_PASSWORD="${DB_PASSWORD}" \
            -e POSTGRES_USER=odoo \
            -v "${INSTALL_DIR}/db:/var/lib/postgresql/data" \
            postgres:15
        sleep 5
    else
        log_warn "odoo-db container already exists, reusing."
    fi

    # Start Odoo container
    log_info "Starting Odoo ${ODOO_VERSION} container on port ${ODOO_PORT}..."
    docker run -d \
        --name odoo \
        --restart unless-stopped \
        -p "${ODOO_PORT}:8069" \
        --link odoo-db:db \
        -v "${INSTALL_DIR}/data:/var/lib/odoo" \
        -v "${INSTALL_DIR}/config:/etc/odoo" \
        -v "${INSTALL_DIR}/addons:/mnt/extra-addons" \
        "odoo:${ODOO_VERSION}"

    log_ok "Odoo ${ODOO_VERSION} installed and running."
    log_info "  Access Odoo at: http://localhost:${ODOO_PORT}"
    log_info "  DB User: odoo | DB Password: ${DB_PASSWORD}"
    log_info "  Data directory: ${INSTALL_DIR}"
    log_info "  Docs: https://hub.docker.com/_/odoo"
}

install_odoo_package() {
    log_info "Installing Odoo ${ODOO_VERSION} via system package..."

    if command -v odoo >/dev/null 2>&1; then
        log_warn "Odoo is already installed. Skipping."
        return 0
    fi

    if command -v apt-get >/dev/null 2>&1; then
        # Debian/Ubuntu
        apt-get install -y wget gnupg
        wget -q -O - https://nightly.odoo.com/odoo.key | gpg --dearmor -o /usr/share/keyrings/odoo-archive-keyring.gpg
        echo "deb [signed-by=/usr/share/keyrings/odoo-archive-keyring.gpg] https://nightly.odoo.com/${ODOO_VERSION}.0/nightly/deb/ ./" \
            > /etc/apt/sources.list.d/odoo.list
        apt-get update && apt-get install -y odoo
        systemctl enable odoo
        systemctl start odoo
    elif command -v dnf >/dev/null 2>&1; then
        # Fedora/RHEL/CentOS
        dnf config-manager --add-repo="https://nightly.odoo.com/${ODOO_VERSION}.0/nightly/rpm/odoo.repo"
        dnf install -y odoo
        systemctl enable odoo
        systemctl start odoo
    elif command -v yum >/dev/null 2>&1; then
        yum-config-manager --add-repo="https://nightly.odoo.com/${ODOO_VERSION}.0/nightly/rpm/odoo.repo"
        yum install -y odoo
        systemctl enable odoo
        systemctl start odoo
    else
        log_err "Unsupported package manager. Use INSTALL_MODE=docker."
        return 1
    fi

    log_ok "Odoo ${ODOO_VERSION} installed via system package."
    log_info "  Access Odoo at: http://localhost:8069"
}

main() {
    log_info "Starting Odoo installation (version ${ODOO_VERSION})..."
    INSTALL_MODE="${INSTALL_MODE:-docker}"

    if [ "$INSTALL_MODE" = "docker" ]; then
        check_docker && install_odoo_docker
    else
        ins...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

📱 Kick off Copilot coding agent tasks wherever you are with [GitHub Mobile](https://gh.io/cca-mobile-docs), available on iOS and Android.

…and React Bricks CMS

Co-authored-by: nexusct <19503275+nexusct@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nexusct/1Panel/sessions/1b017fed-a2d6-4ac9-b287-80226f2549de
Copilot AI requested a review from nexusct March 23, 2026 09:24
Copilot stopped work on behalf of nexusct due to an error March 23, 2026 09:24
@nexusct nexusct marked this pull request as ready for review March 23, 2026 13:06
Copilot AI review requested due to automatic review settings March 23, 2026 13:06
@nexusct nexusct merged commit 387ec3c into dev-v2 Mar 23, 2026
8 of 9 checks passed
@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot bot commented Mar 23, 2026

Kilo Code Review could not run — your account is out of credits.

Add credits at app.kilo.ai to enable reviews on this change.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new CI-side installer scripts to bootstrap several third-party platforms/CLIs (Odoo, Shopify CLI, Contentful CLI, Strapi, React Bricks) and updates the existing CI helper script to mark these installers as executable.

Changes:

  • Added standalone ci/install_*.sh scripts for Odoo, Shopify CLI, Contentful CLI, Strapi, and React Bricks scaffolding/installation.
  • Updated ci/script.sh to chmod +x the new installer scripts when present.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
ci/script.sh Adds a loop to mark installer scripts executable.
ci/install_odoo.sh New Odoo installer supporting Docker (default) and native package install.
ci/install_shopify.sh New installer for Shopify CLI via global npm install.
ci/install_contentful.sh New installer for Contentful CLI via global npm install.
ci/install_strapi.sh New script to scaffold a Strapi project via npx create-strapi.
ci/install_react_bricks.sh New script to scaffold a React Bricks project via npx create-reactbricks-app.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +24
check_node() {
if ! command -v node >/dev/null 2>&1; then
log_err "Node.js is required but not found. Please install Node.js LTS first."
return 1
fi
log_ok "Node.js $(node --version) detected."
}
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_node verifies node exists, but the script later calls npm install -g ... without checking that npm is available. In some environments Node may be present without npm/npx, which would make the install fail with a less clear error. Consider explicitly checking command -v npm (and failing with a helpful message) before running the install.

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +50
for installer in \
install_ai_tools.sh \
install_odoo.sh \
install_shopify.sh \
install_contentful.sh \
install_strapi.sh \
install_react_bricks.sh; do
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ci/script.sh is attempting to chmod install_ai_tools.sh, but that file does not exist anywhere in ci/ on this branch. This makes the installer list misleading; either add the missing script or remove it from the loop to keep the CI script self-consistent.

Copilot uses AI. Check for mistakes.
dnf install -y odoo
systemctl enable odoo
systemctl start odoo
elif command -v yum >/dev/null 2>&1; then
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The yum-config-manager command usually requires yum-utils to be installed; otherwise this repo-add step will fail on some systems. Consider ensuring the dependency is installed (or using an alternative method to add the repo) before invoking yum-config-manager.

Suggested change
elif command -v yum >/dev/null 2>&1; then
elif command -v yum >/dev/null 2>&1; then
if ! command -v yum-config-manager >/dev/null 2>&1; then
yum install -y yum-utils
fi

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +50
if npx create-reactbricks-app@latest "${REACTBRICKS_PROJECT_NAME}"; then
log_ok "React Bricks project '${REACTBRICKS_PROJECT_NAME}' created at ${TARGET_DIR}."
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npx create-reactbricks-app@latest is not reproducible and may change behavior over time, which is risky for CI automation. Consider supporting a pinned version via an env var (and defaulting to a known-good version) so installs remain stable.

Copilot uses AI. Check for mistakes.

log_ok "Odoo ${ODOO_VERSION} installed and running."
log_info " Access Odoo at: http://localhost:${ODOO_PORT}"
log_info " DB User: odoo | DB Password: ${DB_PASSWORD}"
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script logs the generated database password to stdout. In CI (or any environment where logs are retained/centralized) this can leak credentials. Consider omitting the password from logs (or only printing it when an explicit SHOW_CREDENTIALS=1 flag is set) and relying on the restricted credentials file instead.

Suggested change
log_info " DB User: odoo | DB Password: ${DB_PASSWORD}"
if [ "${SHOW_CREDENTIALS:-0}" = "1" ]; then
log_info " DB User: odoo | DB Password: ${DB_PASSWORD}"
else
log_info " DB User: odoo | DB Password: [hidden] (set SHOW_CREDENTIALS=1 to display)"
fi

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +16
ODOO_VERSION="${ODOO_VERSION:-17}"
ODOO_PORT="${ODOO_PORT:-8069}"
DB_PASSWORD="${ODOO_DB_PASSWORD:-$(tr -dc A-Za-z0-9 </dev/urandom | head -c 16)}"
INSTALL_DIR="${ODOO_INSTALL_DIR:-/opt/odoo}"
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DB_PASSWORD defaults to a new random value each run. If odoo-db already exists (and you reuse it later in the script), rerunning this installer can start a new odoo container with a different PASSWORD than the existing Postgres container expects, causing connection failures. To make reruns idempotent, load the password from the persisted credentials file when it exists (or require ODOO_DB_PASSWORD when reusing an existing DB container).

Copilot uses AI. Check for mistakes.
systemctl start odoo
elif command -v dnf >/dev/null 2>&1; then
# Fedora/RHEL/CentOS
dnf config-manager --add-repo="https://nightly.odoo.com/${ODOO_VERSION}.0/nightly/rpm/odoo.repo"
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dnf config-manager command typically comes from dnf-plugins-core; on minimal Fedora/RHEL images it may not be installed, causing this branch to fail. Consider installing the required plugin package (or detecting missing dnf config-manager and falling back to writing the repo file directly) before calling it.

Suggested change
dnf config-manager --add-repo="https://nightly.odoo.com/${ODOO_VERSION}.0/nightly/rpm/odoo.repo"
if dnf config-manager --help >/dev/null 2>&1; then
dnf config-manager --add-repo="https://nightly.odoo.com/${ODOO_VERSION}.0/nightly/rpm/odoo.repo"
else
cat >/etc/yum.repos.d/odoo.repo <<EOF
[odoo]
name=Odoo Nightly ${ODOO_VERSION}.0
baseurl=https://nightly.odoo.com/${ODOO_VERSION}.0/nightly/rpm/
enabled=1
gpgcheck=0
EOF
fi

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +45
log_info "Installing Shopify CLI..."

if command -v shopify >/dev/null 2>&1; then
log_warn "Shopify CLI already installed ($(shopify version 2>/dev/null || echo 'unknown')). Skipping."
return 0
fi

if npm install -g @shopify/cli@latest; then
log_ok "Shopify CLI installed successfully."
log_info " Run 'shopify' to get started."
log_info " Docs: https://shopify.dev/docs/api/shopify-cli"
log_info " GitHub: https://github.com/Shopify/cli"
else
log_err "Failed to install Shopify CLI."
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This installs @shopify/cli@latest, which makes CI runs non-reproducible and increases supply-chain risk (a new upstream release can change behavior or break builds). Consider allowing a pinned version via an environment variable (e.g., SHOPIFY_CLI_VERSION) and defaulting to a known-good version instead of latest.

Suggested change
log_info "Installing Shopify CLI..."
if command -v shopify >/dev/null 2>&1; then
log_warn "Shopify CLI already installed ($(shopify version 2>/dev/null || echo 'unknown')). Skipping."
return 0
fi
if npm install -g @shopify/cli@latest; then
log_ok "Shopify CLI installed successfully."
log_info " Run 'shopify' to get started."
log_info " Docs: https://shopify.dev/docs/api/shopify-cli"
log_info " GitHub: https://github.com/Shopify/cli"
else
log_err "Failed to install Shopify CLI."
# Allow overriding the CLI version via SHOPIFY_CLI_VERSION; default to a pinned known-good version.
CLI_VERSION="${SHOPIFY_CLI_VERSION:-"3.69.0"}"
log_info "Installing Shopify CLI (version ${CLI_VERSION})..."
if command -v shopify >/dev/null 2>&1; then
log_warn "Shopify CLI already installed ($(shopify version 2>/dev/null || echo 'unknown')). Skipping."
return 0
fi
if npm install -g "@shopify/cli@${CLI_VERSION}"; then
log_ok "Shopify CLI installed successfully (version ${CLI_VERSION})."
log_info " Run 'shopify' to get started."
log_info " Docs: https://shopify.dev/docs/api/shopify-cli"
log_info " GitHub: https://github.com/Shopify/cli"
else
log_err "Failed to install Shopify CLI (version ${CLI_VERSION})."

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +51
# Use --quickstart for SQLite (no extra DB setup needed)
if npx create-strapi@latest "${STRAPI_PROJECT_NAME}" --quickstart --no-run; then
log_ok "Strapi project '${STRAPI_PROJECT_NAME}' created at ${TARGET_DIR}."
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using npx create-strapi@latest makes scaffolding non-deterministic across runs and can unexpectedly break CI when upstream releases change prompts/defaults. Consider parameterizing the version (e.g., STRAPI_CREATE_VERSION) and defaulting to a pinned version for repeatable installs.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants