Compare commits

...

14 Commits

Author SHA1 Message Date
MickLesk
c49a166e17 planka: migrate data paths to new v2 directory structure
Planka v2.0.1 moved all uploads to a unified data directory:
- public/{favicons,user-avatars,background-images} -> data/protected/
- private/attachments -> data/private/

The update script was still restoring files to the old locations,
which made attachments, avatars and backgrounds disappear after
updating from rc.4 to 2.0.1.

Changes:
- update_script: backup handles both old and new layouts
- update_script: restore now uses new v2 paths
- install script: create v2 data directories on fresh install

Ref #12066
2026-02-20 21:15:30 +01:00
community-scripts-pr-app[bot]
120aefbdfe Update .app files (#12120)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-02-20 21:06:41 +01:00
community-scripts-pr-app[bot]
fc612ad369 Update CHANGELOG.md (#12123)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-20 20:06:08 +00:00
community-scripts-pr-app[bot]
c061434dd7 Update date in json (#12122)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-02-20 20:06:01 +00:00
community-scripts-pr-app[bot]
7b01ed0a90 Update CHANGELOG.md (#12121)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-20 20:05:58 +00:00
push-app-to-main[bot]
de94a3b0c8 Sure (#12114)
* Add sure (ct)

* Update service messages in sure.sh script

---------

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: Chris <punk.sand7393@fastmail.com>
2026-02-20 21:05:42 +01:00
community-scripts-pr-app[bot]
f25a150fa1 Update CHANGELOG.md (#12119)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-20 20:05:33 +00:00
community-scripts-pr-app[bot]
fd44c98235 Update date in json (#12118)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-02-20 20:05:30 +00:00
push-app-to-main[bot]
c754d0c369 Calibre-Web (#12115)
* Add calibre-web (ct)

* Fix casing in Calibre-Web references

* Correct case for Calibre-Web in installation script

---------

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: Chris <punk.sand7393@fastmail.com>
2026-02-20 21:05:09 +01:00
community-scripts-pr-app[bot]
bc5af1a536 chore: update github-versions.json (#12113)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-20 18:14:34 +00:00
community-scripts-pr-app[bot]
53f89258a4 chore: update github-versions.json (#12108)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-20 12:12:26 +00:00
community-scripts-pr-app[bot]
97302789d9 Update CHANGELOG.md (#12105)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-20 08:12:52 +00:00
Rik
f3b38e2ba2 fixen broken link to dawarich documentation (#12103) 2026-02-20 09:12:21 +01:00
community-scripts-pr-app[bot]
eff0963023 chore: update github-versions.json (#12102)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-20 06:20:06 +00:00
13 changed files with 445 additions and 37 deletions

View File

@@ -406,6 +406,17 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-02-20
### 🆕 New Scripts
- Sure ([#12114](https://github.com/community-scripts/ProxmoxVE/pull/12114))
- Calibre-Web ([#12115](https://github.com/community-scripts/ProxmoxVE/pull/12115))
### 🌐 Website
- #### 📝 Script Information
- fixen broken link to dawarich documentation [@RiX012](https://github.com/RiX012) ([#12103](https://github.com/community-scripts/ProxmoxVE/pull/12103))
## 2026-02-19
### 🆕 New Scripts

73
ct/calibre-web.sh Normal file
View File

@@ -0,0 +1,73 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: mikolaj92
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/janeczku/calibre-web
APP="calibre-web"
var_tags="${var_tags:-media;books}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
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/calibre-web ]]; then
msg_error "No Calibre-Web Installation Found!"
exit
fi
if check_for_gh_release "Calibre-Web" "janeczku/calibre-web"; then
msg_info "Stopping Service"
systemctl stop calibre-web
msg_ok "Stopped Service"
msg_info "Backing up Data"
cp -r /opt/calibre-web/app.db /opt/app.db_backup
cp -r /opt/calibre-web/data /opt/data_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Calibre-Web" "janeczku/calibre-web" "prebuild" "latest" "/opt/calibre-web" "calibre-web*.tar.gz"
setup_uv
msg_info "Installing Dependencies"
cd /opt/calibre-web
$STD uv venv
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir --upgrade pip setuptools wheel
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir -r requirements.txt
msg_ok "Installed Dependencies"
msg_info "Restoring Data"
cp /opt/app.db_backup /opt/calibre-web/app.db 2>/dev/null
cp -r /opt/data_backup /opt/calibre-web/data 2>/dev/null
rm -rf /opt/app.db_backup /opt/data_backup
msg_ok "Restored Data"
msg_info "Starting Service"
systemctl start calibre-web
msg_ok "Started Service"
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 "${TAB}${GATEWAY}${BGN}http://${IP}:8083${CL}"

6
ct/headers/calibre-web Normal file
View File

@@ -0,0 +1,6 @@
___ __ __
_________ _/ (_) /_ ________ _ _____ / /_
/ ___/ __ `/ / / __ \/ ___/ _ \_____| | /| / / _ \/ __ \
/ /__/ /_/ / / / /_/ / / / __/_____/ |/ |/ / __/ /_/ /
\___/\__,_/_/_/_.___/_/ \___/ |__/|__/\___/_.___/

6
ct/headers/sure Normal file
View File

@@ -0,0 +1,6 @@
_____
/ ___/__ __________
\__ \/ / / / ___/ _ \
___/ / /_/ / / / __/
/____/\__,_/_/ \___/

View File

@@ -37,10 +37,18 @@ function update_script() {
BK="/opt/planka-backup"
mkdir -p "$BK"/{favicons,user-avatars,background-images,attachments}
[ -f /opt/planka/.env ] && mv /opt/planka/.env "$BK"/
[ -d /opt/planka/public/favicons ] && cp -a /opt/planka/public/favicons/. "$BK/favicons/"
[ -d /opt/planka/public/user-avatars ] && cp -a /opt/planka/public/user-avatars/. "$BK/user-avatars/"
[ -d /opt/planka/public/background-images ] && cp -a /opt/planka/public/background-images/. "$BK/background-images/"
[ -d /opt/planka/private/attachments ] && cp -a /opt/planka/private/attachments/. "$BK/attachments/"
# Support both old (pre-v2) and new (v2) directory layouts
if [ -d /opt/planka/data/protected ]; then
[ -d /opt/planka/data/protected/favicons ] && cp -a /opt/planka/data/protected/favicons/. "$BK/favicons/"
[ -d /opt/planka/data/protected/user-avatars ] && cp -a /opt/planka/data/protected/user-avatars/. "$BK/user-avatars/"
[ -d /opt/planka/data/protected/background-images ] && cp -a /opt/planka/data/protected/background-images/. "$BK/background-images/"
[ -d /opt/planka/data/private/attachments ] && cp -a /opt/planka/data/private/attachments/. "$BK/attachments/"
else
[ -d /opt/planka/public/favicons ] && cp -a /opt/planka/public/favicons/. "$BK/favicons/"
[ -d /opt/planka/public/user-avatars ] && cp -a /opt/planka/public/user-avatars/. "$BK/user-avatars/"
[ -d /opt/planka/public/background-images ] && cp -a /opt/planka/public/background-images/. "$BK/background-images/"
[ -d /opt/planka/private/attachments ] && cp -a /opt/planka/private/attachments/. "$BK/attachments/"
fi
rm -rf /opt/planka
msg_ok "Backed up data"
@@ -53,11 +61,12 @@ function update_script() {
msg_info "Restoring data"
[ -f "$BK/.env" ] && mv "$BK/.env" /opt/planka/.env
mkdir -p /opt/planka/public/{favicons,user-avatars,background-images} /opt/planka/private/attachments
[ -d "$BK/favicons" ] && cp -a "$BK/favicons/." /opt/planka/public/favicons/
[ -d "$BK/user-avatars" ] && cp -a "$BK/user-avatars/." /opt/planka/public/user-avatars/
[ -d "$BK/background-images" ] && cp -a "$BK/background-images/." /opt/planka/public/background-images/
[ -d "$BK/attachments" ] && cp -a "$BK/attachments/." /opt/planka/private/attachments/
# Planka v2 uses unified data directory structure
mkdir -p /opt/planka/data/protected/{favicons,user-avatars,background-images} /opt/planka/data/private/attachments
[ -d "$BK/favicons" ] && cp -a "$BK/favicons/." /opt/planka/data/protected/favicons/
[ -d "$BK/user-avatars" ] && cp -a "$BK/user-avatars/." /opt/planka/data/protected/user-avatars/
[ -d "$BK/background-images" ] && cp -a "$BK/background-images/." /opt/planka/data/protected/background-images/
[ -d "$BK/attachments" ] && cp -a "$BK/attachments/." /opt/planka/data/private/attachments/
rm -rf "$BK"
msg_ok "Restored data"

68
ct/sure.sh Normal file
View File

@@ -0,0 +1,68 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://sure.am
APP="Sure"
var_tags="${var_tags:-finance}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-6}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
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/sure ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "Sure" "we-promise/sure"; then
msg_info "Stopping Service"
$STD systemctl stop sure
msg_ok "Stopped Service"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Sure" "we-promise/sure" "tarball" "latest" "/opt/sure"
RUBY_VERSION="$(cat /opt/sure/.ruby-version)" RUBY_INSTALL_RAILS=false setup_ruby
msg_info "Updating Sure"
source ~/.profile
cd /opt/sure
export RAILS_ENV=production
export BUNDLE_DEPLOYMENT=1
export BUNDLE_WITHOUT=development
$STD ./bin/bundle install
$STD ./bin/bundle exec bootsnap precompile --gemfile -j 0
$STD ./bin/bundle exec bootsnap precompile -j 0 app/ lib/
export SECRET_KEY_BASE_DUMMY=1 && $STD ./bin/rails assets:precompile
unset SECRET_KEY_BASE_DUMMY
msg_ok "Updated Sure"
msg_info "Starting Service"
$STD systemctl start sure
msg_ok "Started Service"
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 "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

View File

@@ -0,0 +1,44 @@
{
"name": "Calibre-Web",
"slug": "calibre-web",
"categories": [
4
],
"date_created": "2026-02-20",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8083,
"documentation": "https://github.com/janeczku/calibre-web/wiki",
"website": "https://github.com/janeczku/calibre-web",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/flat/calibre-web.webp",
"config_path": "/opt/calibre-web/app.db",
"description": "Web app for browsing, reading and downloading eBooks from a Calibre database. Provides an attractive interface with mobile support, user management, and eBook conversion capabilities.",
"install_methods": [
{
"type": "default",
"script": "ct/calibre-web.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 8,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "No credentials are set by this script. Complete setup and create credentials in the first-run wizard.",
"type": "info"
},
{
"text": "Upload your Calibre library metadata.db during first setup wizard.",
"type": "info"
}
]
}

View File

@@ -9,7 +9,7 @@
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://dawarich.app/docs",
"documentation": "https://dawarich.app/docs/intro",
"website": "https://dawarich.app/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/dawarich.webp",
"config_path": "/opt/dawarich/.env",

View File

@@ -1,5 +1,5 @@
{
"generated": "2026-02-20T00:19:36Z",
"generated": "2026-02-20T18:14:23Z",
"versions": [
{
"slug": "2fauth",
@@ -193,9 +193,9 @@
{
"slug": "cleanuparr",
"repo": "Cleanuparr/Cleanuparr",
"version": "v2.6.3",
"version": "v2.6.4",
"pinned": false,
"date": "2026-02-16T22:41:25Z"
"date": "2026-02-20T14:35:43Z"
},
{
"slug": "cloudreve",
@@ -256,9 +256,9 @@
{
"slug": "databasus",
"repo": "databasus/databasus",
"version": "v3.14.1",
"version": "v3.15.1",
"pinned": false,
"date": "2026-02-18T10:43:45Z"
"date": "2026-02-20T12:28:04Z"
},
{
"slug": "dawarich",
@@ -312,9 +312,9 @@
{
"slug": "drawio",
"repo": "jgraph/drawio",
"version": "v29.3.6",
"version": "v29.5.1",
"pinned": false,
"date": "2026-01-28T18:25:02Z"
"date": "2026-02-20T17:22:31Z"
},
{
"slug": "duplicati",
@@ -368,16 +368,16 @@
{
"slug": "firefly",
"repo": "firefly-iii/firefly-iii",
"version": "v6.4.22",
"version": "v6.4.23",
"pinned": false,
"date": "2026-02-15T18:43:08Z"
"date": "2026-02-20T07:02:05Z"
},
{
"slug": "fladder",
"repo": "DonutWare/Fladder",
"version": "v0.9.0",
"version": "v0.10.0",
"pinned": false,
"date": "2026-01-05T17:30:07Z"
"date": "2026-02-20T14:16:51Z"
},
{
"slug": "flaresolverr",
@@ -592,9 +592,9 @@
{
"slug": "jackett",
"repo": "Jackett/Jackett",
"version": "v0.24.1157",
"version": "v0.24.1167",
"pinned": false,
"date": "2026-02-19T05:51:02Z"
"date": "2026-02-20T05:54:07Z"
},
{
"slug": "jellystat",
@@ -641,9 +641,9 @@
{
"slug": "keycloak",
"repo": "keycloak/keycloak",
"version": "26.5.3",
"version": "26.5.4",
"pinned": false,
"date": "2026-02-10T07:30:08Z"
"date": "2026-02-20T09:19:45Z"
},
{
"slug": "kimai",
@@ -977,9 +977,9 @@
{
"slug": "ots",
"repo": "Luzifer/ots",
"version": "v1.21.1",
"version": "v1.21.2",
"pinned": false,
"date": "2026-02-16T12:12:23Z"
"date": "2026-02-20T16:20:03Z"
},
{
"slug": "outline",
@@ -1040,9 +1040,9 @@
{
"slug": "patchmon",
"repo": "PatchMon/PatchMon",
"version": "v1.4.1",
"version": "v1.4.2",
"pinned": false,
"date": "2026-02-16T18:00:13Z"
"date": "2026-02-20T13:15:31Z"
},
{
"slug": "paymenter",
@@ -1215,9 +1215,9 @@
{
"slug": "qdrant",
"repo": "qdrant/qdrant",
"version": "v1.16.3",
"version": "v1.17.0",
"pinned": false,
"date": "2025-12-19T17:45:42Z"
"date": "2026-02-20T11:11:50Z"
},
{
"slug": "qui",
@@ -1264,9 +1264,9 @@
{
"slug": "recyclarr",
"repo": "recyclarr/recyclarr",
"version": "v7.5.2",
"version": "v8.0.1",
"pinned": false,
"date": "2025-11-30T22:08:46Z"
"date": "2026-02-20T04:52:19Z"
},
{
"slug": "reitti",
@@ -1341,9 +1341,9 @@
{
"slug": "semaphore",
"repo": "semaphoreui/semaphore",
"version": "v2.17.8",
"version": "v2.17.12",
"pinned": false,
"date": "2026-02-18T19:46:43Z"
"date": "2026-02-20T09:16:50Z"
},
{
"slug": "shelfmark",
@@ -1397,9 +1397,9 @@
{
"slug": "speedtest-tracker",
"repo": "alexjustesen/speedtest-tracker",
"version": "v1.13.9",
"version": "v1.13.10",
"pinned": false,
"date": "2026-02-08T21:48:49Z"
"date": "2026-02-20T03:14:47Z"
},
{
"slug": "spoolman",

View File

@@ -0,0 +1,35 @@
{
"name": "Sure",
"slug": "sure",
"categories": [
23
],
"date_created": "2026-02-20",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://github.com/we-promise/sure",
"website": "https://sure.am",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/sure-finance.webp",
"config_path": "/etc/sure/.env",
"description": "The personal finance app for everyone. NOT affiliated with or endorsed by Maybe Finance Inc..",
"install_methods": [
{
"type": "default",
"script": "ct/sure.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 6,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}

View File

@@ -0,0 +1,68 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: mikolaj92
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/janeczku/calibre-web
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 \
build-essential \
python3 \
python3-dev \
libldap2-dev \
libsasl2-dev \
libssl-dev \
imagemagick \
libpango-1.0-0 \
libharfbuzz0b \
libpangoft2-1.0-0 \
fonts-liberation
msg_ok "Installed Dependencies"
msg_info "Installing Calibre (for eBook conversion)"
$STD apt install -y calibre
msg_ok "Installed Calibre"
fetch_and_deploy_gh_release "Calibre-Web" "janeczku/calibre-web" "prebuild" "latest" "/opt/calibre-web" "calibre-web*.tar.gz"
setup_uv
msg_info "Installing Python Dependencies"
cd /opt/calibre-web
$STD uv venv
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir --upgrade pip setuptools wheel
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir -r requirements.txt
msg_ok "Installed Python Dependencies"
msg_info "Creating Service"
mkdir -p /opt/calibre-web/data
cat <<EOF >/etc/systemd/system/calibre-web.service
[Unit]
Description=Calibre-Web Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/calibre-web
ExecStart=/opt/calibre-web/.venv/bin/python /opt/calibre-web/cps.py
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now calibre-web
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc

View File

@@ -50,6 +50,7 @@ cp .env.sample .env
sed -i "s#http://localhost:1337#http://$LOCAL_IP:1337#g" /opt/planka/.env
sed -i "s#postgres@localhost#planka:$DB_PASS@localhost#g" /opt/planka/.env
sed -i "s#notsecretkey#$SECRET_KEY#g" /opt/planka/.env
mkdir -p /opt/planka/data/protected/{favicons,user-avatars,background-images} /opt/planka/data/private/attachments
$STD npm run db:init
msg_ok "Configured PLANKA"

87
install/sure-install.sh Normal file
View File

@@ -0,0 +1,87 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://sure.am
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 \
build-essential \
redis-server \
pkg-config \
libpq-dev \
libvips
msg_ok "Installed Dependencies"
fetch_and_deploy_gh_release "Sure" "we-promise/sure" "tarball" "latest" "/opt/sure"
PG_VERSION="$(sed -n '/postgres:/s/[^[:digit:]]*//p' /opt/sure/compose.example.yml)" setup_postgresql
PG_DB_NAME=sure_production PG_DB_USER=sure_user setup_postgresql_db
RUBY_VERSION="$(cat /opt/sure/.ruby-version)" RUBY_INSTALL_RAILS=false setup_ruby
msg_info "Building Sure"
cd /opt/sure
export RAILS_ENV=production
export BUNDLE_DEPLOYMENT=1
export BUNDLE_WITHOUT=development
$STD ./bin/bundle install
$STD ./bin/bundle exec bootsnap precompile --gemfile -j 0
$STD ./bin/bundle exec bootsnap precompile -j 0 app/ lib/
export SECRET_KEY_BASE_DUMMY=1 && $STD ./bin/rails assets:precompile
unset SECRET_KEY_BASE_DUMMY
msg_ok "Built Sure"
msg_info "Configuring Sure"
KEY="$(openssl rand -hex 64)"
mkdir -p /etc/sure
mv /opt/sure/.env.example /etc/sure/.env
sed -i -e "/^SECRET_KEY_BASE=/s/secret-value/${KEY}/" \
-e 's/_KEY_BASE=.*$/&\n\nRAILS_FORCE_SSL=false \
\
# Change to true when using a reverse proxy \
RAILS_ASSUME_SSL=false/' \
-e "/POSTGRES_PASSWORD=/s/postgres/${PG_DB_PASS}/" \
-e "/POSTGRES_USER=/s/postgres/${PG_DB_USER}\\
POSTGRES_DB=${PG_DB_NAME}/" \
-e "s|^APP_DOMAIN=|&${LOCAL_IP}|" /etc/sure/.env
msg_ok "Configured Sure"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/sure.service
[Unit]
Description=Sure Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/sure
Environment=RAILS_ENV=production
Environment=BUNDLE_DEPLOYMENT=1
Environment=BUNDLE_WITHOUT=development
Environment=PATH=/root/.rbenv/shims:/root/.rbenv/bin:/usr/bin:\$PATH
EnvironmentFile=/etc/sure/.env
ExecStartPre=/opt/sure/bin/rails db:prepare
ExecStart=/opt/sure/bin/rails server
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
$STD systemctl enable -q --now sure
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc