mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-13 14:53:14 +01:00
Add inngest (ct)
This commit is contained in:
1 parent
c9ba40bfdb
commit
2ed93685a8
2 files changed
+119
No files matched your search
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/inngest/inngest
|
||||
|
||||
APP="Inngest"
|
||||
var_tags="${var_tags:-automation;queue;workflow}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/inngest ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "inngest" "inngest/inngest"; then
|
||||
msg_info "Stopping Inngest"
|
||||
systemctl stop inngest
|
||||
msg_ok "Stopped Inngest"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "inngest" "inngest/inngest" "prebuild" "latest" "/opt/inngest" "inngest_*_linux_$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Starting Inngest"
|
||||
systemctl start inngest
|
||||
msg_ok "Started Inngest"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
||||
echo -e "${GATEWAY}${BGN}http://${IP}:8288${CL}"
|
||||
echo -e "${INFO}${YW}Event and signing keys: /opt/inngest_data/.env (inside the container)${CL}"
|
||||
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/inngest/inngest
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y redis-server
|
||||
sed -i 's/^appendonly no/appendonly yes/' /etc/redis/redis.conf
|
||||
systemctl restart redis-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="inngest" PG_DB_USER="inngest" setup_postgresql_db
|
||||
fetch_and_deploy_gh_release "inngest" "inngest/inngest" "prebuild" "latest" "/opt/inngest" "inngest_*_linux_$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Configuring Inngest"
|
||||
mkdir -p /opt/inngest_data
|
||||
cat <<EOF >/opt/inngest_data/.env
|
||||
INNGEST_PORT=8288
|
||||
INNGEST_POSTGRES_URI=postgres://inngest:${PG_DB_PASS}@127.0.0.1:5432/inngest?sslmode=disable
|
||||
INNGEST_REDIS_URI=redis://127.0.0.1:6379
|
||||
INNGEST_EVENT_KEY=$(openssl rand -hex 32)
|
||||
INNGEST_SIGNING_KEY=$(openssl rand -hex 32)
|
||||
DO_NOT_TRACK=1
|
||||
EOF
|
||||
chmod 600 /opt/inngest_data/.env
|
||||
msg_ok "Configured Inngest"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/inngest.service
|
||||
[Unit]
|
||||
Description=Inngest
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Requires=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/inngest_data
|
||||
EnvironmentFile=/opt/inngest_data/.env
|
||||
ExecStart=/opt/inngest/inngest start
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now inngest
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in new issue
Block a user