Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk 438ddc338d arcane: fix projects/builds dir ownership for non-root container UID 2026-08-11 09:02:09 +02:00
3 changed files with 18 additions and 3 deletions
+2 -1
View File
@@ -3,7 +3,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# Copyright (c) 2021-2026 community-scripts ORG
# Author: vhsdream | MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://rxresu.me/ | Github: https://github.com/amruthpillai/reactive-resume
# Source: https://rxresume.org | Github: https://github.com/amruthpillai/reactive-resume
APP="Reactive-Resume"
var_tags="${var_tags:-documents}"
@@ -45,6 +45,7 @@ function update_script() {
msg_info "Updating Reactive Resume (Patience)"
cd /opt/reactive-resume
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
corepack prepare --activate
export CI="true"
export NODE_ENV="production"
+2 -1
View File
@@ -3,7 +3,7 @@
# Copyright (c) 2021-2026 community-scripts ORG
# Author: vhsdream | Rewrite: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://rxresu.me/ | Github: https://github.com/amruthpillai/reactive-resume
# Source: https://rxresume.org | Github: https://github.com/amruthpillai/reactive-resume
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
@@ -39,6 +39,7 @@ msg_ok "Built Reactive Resume"
msg_info "Configuring Reactive Resume"
AUTH_SECRET=$(openssl rand -hex 32)
cat <<EOF >/opt/reactive-resume/.env
# Reactive Resume v5 Configuration
NODE_ENV=production
+14 -1
View File
@@ -59,6 +59,8 @@ function uninstall() {
# UPDATE
# ==============================================================================
function update() {
chown -R 65532:65532 /etc/arcane/projects /etc/arcane/builds 2>/dev/null || true
msg_info "Pulling latest ${APP} image"
cd "$INSTALL_PATH"
$STD docker compose pull
@@ -83,15 +85,25 @@ function install() {
msg_ok "Created ${INSTALL_PATH}"
# Generate secrets and config values
local ENCRYPTION_KEY JWT_SECRET PROJ_DIR
local ENCRYPTION_KEY JWT_SECRET PROJ_DIR BUILDS_DIR
ENCRYPTION_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | head -c32)
JWT_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | head -c32)
PROJ_DIR="/etc/arcane/projects"
BUILDS_DIR="/etc/arcane/builds"
# Arcane drops root and runs as UID/GID 65532 by default (Dockerfile default,
# see backend/pkg/libarcane/startup/runtime_identity.go), so bind-mounted
# host directories must be owned by that UID or the container can't write to them.
msg_info "Creating stacks directory"
mkdir -p "$PROJ_DIR"
chown -R 65532:65532 "$PROJ_DIR"
msg_ok "Created ${PROJ_DIR}"
msg_info "Creating builds directory"
mkdir -p "$BUILDS_DIR"
chown -R 65532:65532 "$BUILDS_DIR"
msg_ok "Created ${BUILDS_DIR}"
msg_info "Downloading Docker Compose file"
curl -fsSL "https://raw.githubusercontent.com/getarcaneapp/arcane/refs/heads/main/docker/examples/compose.basic.yaml" -o "$COMPOSE_FILE"
msg_ok "Downloaded Docker Compose file"
@@ -103,6 +115,7 @@ function install() {
msg_info "Configuring compose and env files"
sed -i '/^[[:space:]]*#/!s|/host/path/to/projects|'"$PROJ_DIR"'|g' "$COMPOSE_FILE"
sed -i '/^[[:space:]]*#/!s|/host/path/to/builds|'"$BUILDS_DIR"'|g' "$COMPOSE_FILE"
sed -i '/^[[:space:]]*#/!s|ENCRYPTION_KEY=.*|ENCRYPTION_KEY='"$ENCRYPTION_KEY"'|g' "$COMPOSE_FILE"
sed -i '/^[[:space:]]*#/!s|JWT_SECRET=.*|JWT_SECRET='"$JWT_SECRET"'|g' "$COMPOSE_FILE"
sed -i '/^[[:space:]]*#/!s|APP_URL=.*|APP_URL=http://localhost:'"$DEFAULT_PORT"'|g' "$ENV_FILE"