Files
ReachableCEO 54cc5f7308 feat(apisix): add Cloudron package
- Implements Apache APISIX packaging for Cloudron platform.
- Includes Dockerfile, CloudronManifest.json, and start.sh.
- Configured to use Cloudron's etcd addon.

🤖 Generated with Gemini CLI
Co-Authored-By: Gemini <noreply@google.com>
2025-09-04 09:42:47 -05:00

29 lines
613 B
Bash

#!/usr/bin/env bash
set -euo pipefail
# Set APISIX prefix
PREFIX=${APISIX_PREFIX:=/usr/local/apisix}
# Generate APISIX configuration (config.yaml) to connect to Cloudron etcd
cat <<EOF > ${PREFIX}/conf/config.yaml
apisix:
etcd:
host:
- "http://${CLOUDRON_ETCD_HOST}:${CLOUDRON_ETCD_PORT}"
prefix: "/apisix"
timeout: 30
# Other APISIX configuration can go here if needed
EOF
# Initialize APISIX
/usr/bin/apisix init
# Initialize etcd connection for APISIX
/usr/bin/apisix init_etcd
# Start OpenResty (APISIX server)
exec /usr/local/openresty/bin/openresty -p ${PREFIX} -g 'daemon off;'