mirror of
https://github.com/okxlin/appstore.git
synced 2026-10-03 00:00:15 +00:00
Add 1Panel app packages for CPA Manager, CPA Manager Plus, Docker Hub Proxy, kspeeder, LibreTranslate, OxiDNS, TREK, Voicebox, and SimpleX SMP Server using official images and upstream deployment references. Keep at most one fixed numeric version plus latest per app, avoid duplicate keys already present in the appstore, and expose the useful runtime settings through data.yml where practical. Validation: strict validate-v2 for every packaged version; fresh-panel smoke passed for Voicebox latest, SimpleX SMP Server latest, and SimpleX SMP Server 6.5.2; existing smoke reports retained for the rest of the batch.
75 lines
2.3 KiB
YAML
75 lines
2.3 KiB
YAML
services:
|
|
simplex-smp-server:
|
|
image: "simplexchat/smp-server:latest"
|
|
container_name: ${CONTAINER_NAME}
|
|
environment:
|
|
- ADDR=${ADDR}
|
|
- PASS=${PASS}
|
|
entrypoint:
|
|
- /bin/sh
|
|
- -lc
|
|
- |
|
|
set -e
|
|
confd=/etc/opt/simplex
|
|
if [ ! -f "$$confd/smp-server.ini" ]; then
|
|
case "$${ADDR}" in
|
|
'')
|
|
printf 'Please specify $ADDR environment variable.\n'
|
|
exit 1
|
|
;;
|
|
*[a-zA-Z]*)
|
|
case "$${ADDR}" in
|
|
*:*)
|
|
set -- --ip "$${ADDR}"
|
|
;;
|
|
*.*)
|
|
ADDR_BASE="$(printf '%s' "$${ADDR}" | awk -F. '{print $$(NF-1)"."$$NF}')"
|
|
set -- --fqdn "$${ADDR}" --own-domains="$$ADDR_BASE"
|
|
;;
|
|
*)
|
|
printf 'Incorrect $ADDR environment variable. Please specify a domain or IP.\n'
|
|
exit 1
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
set -- --ip "$${ADDR}"
|
|
;;
|
|
esac
|
|
if [ -n "$${PASS}" ]; then
|
|
set -- "$@" --password "$${PASS}"
|
|
else
|
|
set -- "$@" --no-password
|
|
fi
|
|
smp-server init --yes --store-log --daily-stats --source-code "$@" >/dev/null
|
|
sed -i \
|
|
-e 's|^# http = 8000|http = 8000|' \
|
|
-e 's|^https = 443|#https = 443|' \
|
|
-e 's|^cert = /etc/opt/simplex/web.crt|#cert = /etc/opt/simplex/web.crt|' \
|
|
-e 's|^key = /etc/opt/simplex/web.key|#key = /etc/opt/simplex/web.key|' \
|
|
-e 's|^port = .*|port = 5223|' \
|
|
"$$confd/smp-server.ini"
|
|
fi
|
|
DOCKER=true /usr/local/bin/simplex-servers-stopscript smp-server
|
|
exec smp-server start +RTS -N -RTS
|
|
ports:
|
|
- "${PANEL_APP_PORT_HTTP}:8000"
|
|
- "${PANEL_APP_PORT_SMP}:5223"
|
|
volumes:
|
|
- "${APP_CONFIG_DIR}:/etc/opt/simplex"
|
|
- "${APP_STATE_DIR}:/var/opt/simplex"
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- >-
|
|
bash -lc 'exec 3<>/dev/tcp/127.0.0.1/8000; printf "GET / HTTP/1.0\r\nHost: 127.0.0.1\r\n\r\n" >&3; head -n 1 <&3 | grep "200 OK" >/dev/null'
|
|
labels:
|
|
createdBy: Apps
|
|
networks:
|
|
- 1panel-network
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
1panel-network:
|
|
external: true
|