mirror of
https://github.com/okxlin/appstore.git
synced 2026-11-22 00:00:30 +00:00
Follow-up-to-PR: #9035 Source-PR: https://github.com/okxlin/appstore/pull/9035 Maintainer-workflow: appstore-pr-maintainer Move the pinned GoTab package to its matching 2.3.1.2 directory. The 1Panel v2 smoke upgraded 2.3.0.10 to 2.3.1.2 and passed install, access, restart, and cleanup.
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
services:
|
|
gotab-server:
|
|
image: "doxwant/gotab:2.3.1.2"
|
|
container_name: ${CONTAINER_NAME}
|
|
entrypoint:
|
|
- /bin/sh
|
|
- -ec
|
|
- |
|
|
runtime_dir=/data
|
|
binary_tmp="$$(mktemp "$$runtime_dir/.gotab-server.XXXXXX")"
|
|
web_tmp="$$(mktemp -d "$$runtime_dir/.gotab-web.XXXXXX")"
|
|
cleanup() {
|
|
if [ -n "$$binary_tmp" ]; then
|
|
rm -f -- "$$binary_tmp"
|
|
fi
|
|
if [ -n "$$web_tmp" ]; then
|
|
rm -rf -- "$$web_tmp"
|
|
fi
|
|
}
|
|
trap cleanup EXIT HUP INT TERM
|
|
cp /app/gotab-server "$$binary_tmp"
|
|
chmod 0755 "$$binary_tmp"
|
|
cp -a /app/web/. "$$web_tmp/"
|
|
rm -rf -- "$$runtime_dir/web"
|
|
mv "$$web_tmp" "$$runtime_dir/web"
|
|
web_tmp=""
|
|
mv "$$binary_tmp" "$$runtime_dir/gotab-server"
|
|
binary_tmp=""
|
|
config_file="$$runtime_dir/config.toml"
|
|
if [ -d "$$config_file" ]; then
|
|
rmdir "$$config_file"
|
|
elif [ -f "$$config_file" ] &&
|
|
! grep -Eq '^[[:space:]]*[A-Za-z0-9_.-]+[[:space:]]*=' "$$config_file"; then
|
|
rm -f -- "$$config_file"
|
|
fi
|
|
cd "$$runtime_dir"
|
|
trap - EXIT HUP INT TERM
|
|
exec ./gotab-server -port=8080
|
|
ports:
|
|
- ${PANEL_APP_PORT_HTTP}:8080
|
|
volumes:
|
|
- ./data:/data
|
|
environment:
|
|
- SERVER_PORT=8080
|
|
- TZ=${TIME_ZONE}
|
|
networks:
|
|
- 1panel-network
|
|
labels:
|
|
createdBy: Apps
|
|
networks:
|
|
1panel-network:
|
|
external: true
|