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>
This commit is contained in:
28
CloudronPackages/APISIX/start.sh
Normal file
28
CloudronPackages/APISIX/start.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/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;'
|
Reference in New Issue
Block a user