Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c0e1aa666e | |||
| f8d620f4d3 | |||
| 899c4d91d6 | |||
| 0f268fdcae | |||
| da0ed0e2ad | |||
| f0eadbc2d7 | |||
| a02ca4d3e7 | |||
| 2ff2bf9ea7 | |||
| 355a9d68e5 | |||
| 11f6c4df36 | |||
| a567bf6c51 |
+24
-6
@@ -6,6 +6,20 @@ correspond to git tags (`vX.Y.Z`) and `nodejs/package.json`'s `version`.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.1.15] - 2026-07-18
|
||||
|
||||
### Changed
|
||||
- `ops/install.sh` now installs to `/opt/theta42/proxy` (was `/var/www/proxy`) and seeds `/etc/proxy/secrets.js` from `secrets.js.example` on first run (never overwritten on later runs), instead of requiring a manual `nodejs/conf/secrets.js` edit inside the repo checkout. `ops/proxy.service` sets `CONF_SECRETS=/etc/proxy/secrets.js` to match.
|
||||
- `install.sh` now prints the version it's updating from/to (or "Already up to date") on every run, instead of updating silently.
|
||||
|
||||
### Fixed
|
||||
- `install.sh` could hang indefinitely on a fresh host if a base package pulled in `tzdata` as a new dependency — it prompted interactively for a timezone with no TTY attached. Set `DEBIAN_FRONTEND=noninteractive`.
|
||||
|
||||
## [1.1.14] - 2026-07-17
|
||||
|
||||
### Changed
|
||||
- Bumped `@simpleworkjs/conf` to 1.2.0 and `jq-repeat` to 2.2.0. The Docker entrypoint now sets the new `CONF_SECRETS` env var to point directly at a mounted `proxy-secrets.js` instead of symlinking it into `/app/conf/secrets.js` — the app no longer needs write access to its own `conf/` directory to pick up mounted secrets.
|
||||
|
||||
## [1.1.13] - 2026-07-17
|
||||
|
||||
### Added
|
||||
@@ -14,24 +28,24 @@ correspond to git tags (`vX.Y.Z`) and `nodejs/package.json`'s `version`.
|
||||
### Fixed
|
||||
- The in-app docs viewer rendered every `docs/*.md` page with a garbled heading and a stray horizontal rule at the top — Jekyll front matter (meant only for the GitHub Pages build) was never stripped before being handed to the markdown renderer. Also fixed: cross-doc links never resolved in-app, since this viewer serves docs at `/docs/<slug>` with no `.html` suffix — they're now rewritten to the correct in-app URL (by registered slug, falling back to the doc's real filename), the same way image paths already were.
|
||||
|
||||
Bumps to v1.1.13.
|
||||
## [1.1.12] - 2026-07-17
|
||||
|
||||
### Fixed
|
||||
- The host edit form's "Parent Wildcard" option stayed greyed out even when a valid wildcard actually existed for that host, so an already-created host could never be switched onto one from the edit modal (only brand-new hosts, via the field's `keyup` handler, ever saw it become available). The underlying `/host/lookup/:item` check also had the same self-match issue as the recently-fixed backend bug: it resolved an already-existing host to its own record instead of a sibling wildcard. Added a dedicated `/host/wildcard-parent/:item` endpoint that checks both directions, and the edit form now actually runs the check when it opens.
|
||||
- Fixed an nginx startup warning: `the "listen ... http2" directive is deprecated, use the "http2" directive instead`. Migrated to the standalone `http2 on;` directive (nginx 1.25.1+).
|
||||
|
||||
Bumps to v1.1.12.
|
||||
## [1.1.11] - 2026-07-17
|
||||
|
||||
### Changed
|
||||
- Moved the help (❓) link out of the global header and onto each relevant card individually (Proxy List, Add/Edit host, Add DNS Provider, Dynamic A Records, Add New User, User List, Add Permission, Permissions, Add Group) — each now deep-links straight to the doc that actually covers it, instead of one generic header icon.
|
||||
|
||||
Bumps to v1.1.11.
|
||||
## [1.1.10] - 2026-07-17
|
||||
|
||||
### Added
|
||||
- A help icon (❓) in the top-right header now deep-links to the doc most relevant to the current page (falls back to the docs index elsewhere).
|
||||
- The in-app docs viewer (`/docs`) is now searchable — a simple line-substring search over the same local doc set, no new dependency, still works with no internet access.
|
||||
|
||||
Bumps to v1.1.10.
|
||||
## [1.1.9] - 2026-07-17
|
||||
|
||||
### Added
|
||||
- The host list now shows who created each host, and when.
|
||||
@@ -42,7 +56,7 @@ Bumps to v1.1.10.
|
||||
- The host create/edit modal's tabs could overflow awkwardly on narrow (mobile) screens — they now scroll horizontally instead.
|
||||
- Fixed a bug in the vendored `model-redis` library's record-rename path: renaming a record's primary key while another `always`-type field (e.g. `updated_on`) is defined earlier in the schema left a stray, incomplete hash behind under the old key, making that name permanently unavailable for reuse. Worked around in `Host.prototype.update()`.
|
||||
|
||||
Bumps to v1.1.9.
|
||||
## [1.1.8] - 2026-07-17
|
||||
|
||||
### Fixed
|
||||
- **Couldn't attach an existing host to a parent wildcard.** The host edit form's "Parent Wildcard" option submitted correctly, but `Host.prototype.update()` had no `challengeType` handling at all (only `Host.create()` did) — selecting it and saving silently did nothing. Added the same wildcard-parent lookup to `update()`.
|
||||
@@ -50,6 +64,8 @@ Bumps to v1.1.9.
|
||||
|
||||
Both required a corrected lookup: attaching an *existing* host (which already has its own tree leaf) needed a new `Host.lookUpWildcardParent()` that checks the sibling wildcard slot instead of resolving to the host's own record.
|
||||
|
||||
## [1.1.7] - 2026-07-16
|
||||
|
||||
### Changed
|
||||
- Redesigned the GitHub Pages docs site to match the app's own look (dark navbar/footer, Bootstrap 5, Font Awesome) instead of the generic `jekyll-theme-cayman` theme, added a real cross-page nav, SEO (`jekyll-seo-tag` + `jekyll-sitemap`, per-page descriptions, OG/Twitter tags, sitemap.xml, robots.txt), and mobile-responsive layout.
|
||||
|
||||
@@ -96,7 +112,9 @@ First tagged release. Establishes the `vX.Y.Z` tag convention that the in-app up
|
||||
- Standalone backup script (`ops/backup.sh`) for deployments not using theta-env's orchestrator — snapshots Redis and `./config`, with retention.
|
||||
- Admin-only in-app banner that checks GitHub releases every 24h and surfaces available updates.
|
||||
|
||||
[Unreleased]: https://github.com/theta42/proxy/compare/v1.1.13...HEAD
|
||||
[Unreleased]: https://github.com/theta42/proxy/compare/v1.1.15...HEAD
|
||||
[1.1.15]: https://github.com/theta42/proxy/compare/v1.1.14...v1.1.15
|
||||
[1.1.14]: https://github.com/theta42/proxy/compare/v1.1.13...v1.1.14
|
||||
[1.1.13]: https://github.com/theta42/proxy/compare/v1.1.12...v1.1.13
|
||||
[1.1.12]: https://github.com/theta42/proxy/compare/v1.1.11...v1.1.12
|
||||
[1.1.11]: https://github.com/theta42/proxy/compare/v1.1.10...v1.1.11
|
||||
|
||||
+14
-5
@@ -227,16 +227,25 @@ docker compose logs --tail=200 --since=10m proxy # recent context
|
||||
|
||||
`ops/install.sh` is an idempotent installer: it installs Node.js 22.x, OpenResty
|
||||
(from openresty.org), Lua modules (luarocks), Redis, force-syncs the repo to
|
||||
`/var/www/proxy`, symlinks the OpenResty + systemd config from the repo, and
|
||||
starts `proxy.service`. Re-run it to update.
|
||||
`/opt/theta42/proxy`, symlinks the OpenResty + systemd config from the repo, and
|
||||
starts `proxy.service`. Re-run it to update — it prints the version you're
|
||||
updating from and to (or "Already up to date" if there's nothing new).
|
||||
|
||||
```bash
|
||||
wget -O - https://raw.githubusercontent.com/theta42/proxy/master/ops/install.sh | sudo bash
|
||||
```
|
||||
|
||||
or, if you already have the repo checked out:
|
||||
|
||||
```bash
|
||||
sudo ./ops/install.sh
|
||||
```
|
||||
|
||||
Configuration is file-based: write `nodejs/conf/secrets.js` with the OIDC +
|
||||
LDAP values (see `nodejs/conf/base.js` for the shape), then
|
||||
`sudo systemctl restart proxy`.
|
||||
Configuration is file-based: on first run the installer seeds
|
||||
`/etc/proxy/secrets.js` from `secrets.js.example` (placeholders you must fill
|
||||
in — OIDC + LDAP values, see `nodejs/conf/base.js` for the shape). Edit it,
|
||||
then `sudo systemctl restart proxy`. Later runs never touch an existing
|
||||
secrets file.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -127,10 +127,15 @@ This installer will:
|
||||
- Install and configure Redis
|
||||
- Set up SSL fallback certificates
|
||||
- Install Lua dependencies (lua-resty-auto-ssl, luasocket)
|
||||
- Clone and install the proxy application
|
||||
- Clone/update the proxy application at `/opt/theta42/proxy`
|
||||
- Seed `/etc/proxy/secrets.js` on first run (edit it, then re-run or `systemctl restart proxy`)
|
||||
- Configure systemd service
|
||||
- Start the proxy service
|
||||
|
||||
It's idempotent and safe to re-run — re-running it updates the app in place and
|
||||
prints the version you're updating from and to (e.g. `Updated v1.1.13 ->
|
||||
v1.1.14`), or `Already up to date` if there's nothing new.
|
||||
|
||||
## Logs (Docker)
|
||||
|
||||
The all-in-one image runs OpenResty in the foreground and the Node app in the
|
||||
@@ -224,15 +229,24 @@ cp ops/nginx_conf/targetinfo.lua /usr/local/openresty/lualib/targetinfo.lua
|
||||
|
||||
Clone and install:
|
||||
```bash
|
||||
cd /var/www
|
||||
mkdir -p /opt/theta42
|
||||
cd /opt/theta42
|
||||
git clone https://github.com/theta42/proxy.git
|
||||
cd proxy/nodejs
|
||||
npm install
|
||||
```
|
||||
|
||||
Configure secrets:
|
||||
```bash
|
||||
mkdir -p /etc/proxy
|
||||
cp ../secrets.js.example /etc/proxy/secrets.js
|
||||
chmod 600 /etc/proxy/secrets.js
|
||||
$EDITOR /etc/proxy/secrets.js
|
||||
```
|
||||
|
||||
Create systemd service:
|
||||
```bash
|
||||
cp ops/proxy.service /etc/systemd/system/proxy.service
|
||||
cp ../ops/proxy.service /etc/systemd/system/proxy.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable proxy.service
|
||||
systemctl start proxy.service
|
||||
|
||||
+10
-9
@@ -9,13 +9,14 @@
|
||||
# 3. OpenResty (80/443/4443) — exec'd in the foreground as PID 2 (under
|
||||
# dumb-init, PID 1) so it receives SIGTERM from `docker stop`.
|
||||
#
|
||||
# The app reads its config from conf/base.js deep-merged with conf/secrets.js
|
||||
# and `app_*` env vars (requires @simpleworkjs/conf >= 1.1.0, pinned in
|
||||
# The app reads its config from conf/base.js deep-merged with a secrets file
|
||||
# and `app_*` env vars (requires @simpleworkjs/conf >= 1.2.0, pinned in
|
||||
# nodejs/package-lock.json). No secrets.js is baked into the image. The unified
|
||||
# theta-env stack mounts ./config/proxy-secrets.js at /config; this entrypoint
|
||||
# symlinks it into /app/conf/secrets.js so the app reads oidc/ldap/auth config
|
||||
# from the file (no app_* env needed). Without the mount, supply the same config
|
||||
# via `app_*` env (compose `environment:` / `env_file:`).
|
||||
# points CONF_SECRETS at it so the app reads oidc/ldap/auth config straight
|
||||
# from the mounted file (no app_* env needed, no write access to /app/conf
|
||||
# required). Without the mount, supply the same config via `app_*` env
|
||||
# (compose `environment:` / `env_file:`).
|
||||
#
|
||||
# OpenResty config: the committed ops/nginx_conf/*.conf carry the bare-metal
|
||||
# home-LAN values (set_real_ip_from 192.168.1.0/24; resolver 192.168.1.1). They
|
||||
@@ -30,14 +31,14 @@ error() { echo "[ERROR] $*" >&2; }
|
||||
|
||||
# ── Optional: mount proxy secrets.js ─────────────────────────────────────────
|
||||
# When /config/proxy-secrets.js is present (unified theta-env stack, or any
|
||||
# deployment that bind-mounts ./config), symlink it into /app/conf/secrets.js so
|
||||
# @simpleworkjs/conf reads the oidc/ldap/auth config from the file. No app_* env
|
||||
# should then be passed — app_* env beats secrets.js in @simpleworkjs/conf
|
||||
# deployment that bind-mounts ./config), point CONF_SECRETS at it so
|
||||
# @simpleworkjs/conf reads the oidc/ldap/auth config from the file. No app_*
|
||||
# env should then be passed — app_* env beats secrets.js in @simpleworkjs/conf
|
||||
# (precedence: base.js < <env>.js < secrets.js < app_* env), so the file is
|
||||
# authoritative only if the matching app_* env is absent. When the file is
|
||||
# absent the app falls back to app_* env (compose environment / env_file).
|
||||
if [[ -f /config/proxy-secrets.js ]]; then
|
||||
ln -sf /config/proxy-secrets.js /app/conf/secrets.js
|
||||
export CONF_SECRETS=/config/proxy-secrets.js
|
||||
info "Loaded config from /config/proxy-secrets.js (secrets.js authoritative)"
|
||||
fi
|
||||
|
||||
|
||||
+16
-3
@@ -146,7 +146,8 @@ openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \
|
||||
Clone the repository and copy configuration files:
|
||||
|
||||
```bash
|
||||
cd /var/www
|
||||
mkdir -p /opt/theta42
|
||||
cd /opt/theta42
|
||||
git clone https://github.com/theta42/proxy.git
|
||||
cd proxy
|
||||
|
||||
@@ -161,14 +162,26 @@ cp ops/nginx_conf/targetinfo.lua /usr/local/openresty/lualib/targetinfo.lua
|
||||
### Step 7: Install Application
|
||||
|
||||
```bash
|
||||
cd /var/www/proxy/nodejs
|
||||
cd /opt/theta42/proxy/nodejs
|
||||
npm install
|
||||
```
|
||||
|
||||
### Step 7b: Configure Secrets
|
||||
|
||||
```bash
|
||||
mkdir -p /etc/proxy
|
||||
cp /opt/theta42/proxy/secrets.js.example /etc/proxy/secrets.js
|
||||
chmod 600 /etc/proxy/secrets.js
|
||||
$EDITOR /etc/proxy/secrets.js # set oidc.clientId/clientSecret, ldap.bindPassword, ...
|
||||
```
|
||||
|
||||
`@simpleworkjs/conf` reads this file via the `CONF_SECRETS` env var, which the
|
||||
systemd unit below sets to `/etc/proxy/secrets.js`.
|
||||
|
||||
### Step 8: Configure Systemd Service
|
||||
|
||||
```bash
|
||||
cp /var/www/proxy/ops/proxy.service /etc/systemd/system/proxy.service
|
||||
cp /opt/theta42/proxy/ops/proxy.service /etc/systemd/system/proxy.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable proxy.service
|
||||
systemctl start proxy.service
|
||||
|
||||
Generated
+8
-8
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "proxy-api",
|
||||
"version": "1.1.13",
|
||||
"version": "1.1.15",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "proxy-api",
|
||||
"version": "1.1.13",
|
||||
"version": "1.1.15",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^7.3.0",
|
||||
@@ -281,9 +281,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@simpleworkjs/conf": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@simpleworkjs/conf/-/conf-1.1.0.tgz",
|
||||
"integrity": "sha512-MKRQQ4JAH2tbEm87NdkmfikTT58Tyk/SFbvCC7zKja0bK6j8zYyBXTQUJ0rnvFOVEalDWd/au4AEiptOCEqgvA==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@simpleworkjs/conf/-/conf-1.2.0.tgz",
|
||||
"integrity": "sha512-X4u1oRb0A0x7wzmyiIH5hPYYIFJYUXhYVe9CPX6G6INouRIeZuHlx0pthHlihiAAIc3+KqZBx18qirFN8RoJwA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"extend": "^3.0.2"
|
||||
@@ -1375,9 +1375,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/jq-repeat": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jq-repeat/-/jq-repeat-2.1.0.tgz",
|
||||
"integrity": "sha512-e1OmSWeBEHEtyOhNVysx0bnT5wd6HlZ37JZgPcGPmACJ0K9bXDPq0xOwrM1slQMSTw7FOSNDX+MD6VwvPeeZyQ==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/jq-repeat/-/jq-repeat-2.2.0.tgz",
|
||||
"integrity": "sha512-OdKAQJ8SOTZzoNL/76o5+WJehXnMCoP8aXbDtZCmDh3vuGGdXfN14FkPTqLpZC5xmlv+QVfTXu/UaIRsDjVuhA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "proxy-api",
|
||||
"version": "1.1.13",
|
||||
"version": "1.1.15",
|
||||
"private": true,
|
||||
"author": [
|
||||
{
|
||||
@@ -22,7 +22,7 @@
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^7.3.0",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"@simpleworkjs/conf": "^1.1.0",
|
||||
"@simpleworkjs/conf": "^1.2.0",
|
||||
"acme-client": "^5.4.0",
|
||||
"axios": "^1.13.5",
|
||||
"bcrypt": "^6.0.0",
|
||||
@@ -32,7 +32,7 @@
|
||||
"express": "^5.2.1",
|
||||
"express-rate-limit": "^8.5.2",
|
||||
"extend": "^3.0.2",
|
||||
"jq-repeat": "^2.1.0",
|
||||
"jq-repeat": "^2.2.0",
|
||||
"jquery": "^4.0.0",
|
||||
"ldapts": "^8.1.8",
|
||||
"linux-sys-user": "^1.2.0",
|
||||
|
||||
+48
-3
@@ -9,19 +9,29 @@
|
||||
# update is just "sync the repo + reload" -- the files under /etc always track
|
||||
# the repo, so there is nothing to re-copy.
|
||||
#
|
||||
# Secrets live at $SECRETS_FILE (/etc/proxy/secrets.js by default), outside the
|
||||
# repo checkout so they survive the hard reset below. First run seeds it from
|
||||
# secrets.js.example (placeholders you must fill in); later runs never touch
|
||||
# an existing file.
|
||||
#
|
||||
# Intended to be driven by CI/CD with no human writes on prod: the checkout is
|
||||
# hard-reset to origin/$BRANCH on every run, so the box deterministically mirrors
|
||||
# the repo (any drift on the box is discarded).
|
||||
#
|
||||
# Usage: sudo ./install.sh (override with REPO_URL=, REPO_DIR=, BRANCH=)
|
||||
# Usage: sudo ./install.sh (override with REPO_URL=, REPO_DIR=, BRANCH=,
|
||||
# SECRETS_FILE=)
|
||||
set -euo pipefail
|
||||
# Never block on an interactive git credential prompt in CI.
|
||||
export GIT_TERMINAL_PROMPT=0
|
||||
# Never block on an interactive debconf prompt (e.g. tzdata, pulled in as a
|
||||
# dependency on a box that's never configured it).
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
REPO_URL="${REPO_URL:-https://github.com/theta42/proxy.git}"
|
||||
REPO_DIR="${REPO_DIR:-/var/www/proxy}"
|
||||
REPO_DIR="${REPO_DIR:-/opt/theta42/proxy}"
|
||||
BRANCH="${BRANCH:-master}"
|
||||
NODE_MAJOR=22
|
||||
SECRETS_FILE="${SECRETS_FILE:-/etc/proxy/secrets.js}"
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "This script must be run as root (try: sudo $0)" >&2
|
||||
@@ -34,6 +44,19 @@ link(){
|
||||
echo "linked $2 -> $1"
|
||||
}
|
||||
|
||||
# Read the "version" field out of a package.json without depending on Node
|
||||
# being installed yet (this runs before the Node.js install step below).
|
||||
pkg_version(){
|
||||
sed -n 's/^[[:space:]]*"version":[[:space:]]*"\([^"]*\)".*/\1/p' "$1" | head -1
|
||||
}
|
||||
|
||||
# Installed version before this run touches anything, for the upgrade banner
|
||||
# at the end. Empty on a fresh install (no prior checkout).
|
||||
CURRENT_VERSION=""
|
||||
if [ -f "$REPO_DIR/nodejs/package.json" ]; then
|
||||
CURRENT_VERSION="$(pkg_version "$REPO_DIR/nodejs/package.json")"
|
||||
fi
|
||||
|
||||
echo "==> Base packages"
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
@@ -134,6 +157,20 @@ else
|
||||
git clone --branch "$BRANCH" "$REPO_URL" "$REPO_DIR"
|
||||
fi
|
||||
|
||||
NEW_VERSION="$(pkg_version "$REPO_DIR/nodejs/package.json")"
|
||||
|
||||
echo "==> Secrets file at ${SECRETS_FILE}"
|
||||
install -d -m 0750 "$(dirname "$SECRETS_FILE")"
|
||||
if [ ! -f "$SECRETS_FILE" ]; then
|
||||
cp "$REPO_DIR/secrets.js.example" "$SECRETS_FILE"
|
||||
chmod 600 "$SECRETS_FILE"
|
||||
echo " seeded ${SECRETS_FILE} from secrets.js.example -- EDIT IT before the proxy will work:"
|
||||
echo " \$EDITOR ${SECRETS_FILE}"
|
||||
echo " then re-run this script (or: sudo systemctl restart proxy)"
|
||||
else
|
||||
echo " ${SECRETS_FILE} already exists, leaving it untouched"
|
||||
fi
|
||||
|
||||
echo "==> Symlink config from the repo"
|
||||
install -d /etc/openresty/sites-enabled /var/log/nginx
|
||||
link "$REPO_DIR/ops/nginx_conf/nginx.conf" /etc/openresty/nginx.conf
|
||||
@@ -162,4 +199,12 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "==> Done. Update later with: sudo BRANCH=${BRANCH} $0"
|
||||
echo "==> Done."
|
||||
if [ -z "$CURRENT_VERSION" ]; then
|
||||
echo " Installed v${NEW_VERSION}."
|
||||
elif [ "$CURRENT_VERSION" = "$NEW_VERSION" ]; then
|
||||
echo " Already up to date (v${NEW_VERSION})."
|
||||
else
|
||||
echo " Updated v${CURRENT_VERSION} -> v${NEW_VERSION}."
|
||||
fi
|
||||
echo " Update later with: sudo BRANCH=${BRANCH} $0"
|
||||
|
||||
+3
-2
@@ -8,9 +8,10 @@ Type=simple
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
User=root
|
||||
WorkingDirectory=/var/www/proxy/nodejs
|
||||
WorkingDirectory=/opt/theta42/proxy/nodejs
|
||||
Environment="NODE_ENV=production"
|
||||
ExecStart=/usr/bin/env node /var/www/proxy/nodejs/bin/www
|
||||
Environment="CONF_SECRETS=/etc/proxy/secrets.js"
|
||||
ExecStart=/usr/bin/env node /opt/theta42/proxy/nodejs/bin/www
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
+7
-4
@@ -6,13 +6,16 @@
|
||||
// direct LDAP client for user lookups. This file supplies that wiring.
|
||||
//
|
||||
// Docker / unified stack: place at ./config/proxy-secrets.js and bind-mount
|
||||
// ./config at /config (see docker-compose.yml); docker-entrypoint.sh symlinks
|
||||
// it into /app/conf/secrets.js so @simpleworkjs/conf reads it. No app_* env
|
||||
// ./config at /config (see docker-compose.yml); docker-entrypoint.sh points the
|
||||
// CONF_SECRETS env var at it so @simpleworkjs/conf reads it. No app_* env
|
||||
// should be passed — app_* env beats this file in @simpleworkjs/conf, so the
|
||||
// file is authoritative only if the matching app_* env is absent.
|
||||
//
|
||||
// Bare-metal: copy to nodejs/conf/secrets.js and fill in your values. Values
|
||||
// here override conf/base.js and win over <environment>.js.
|
||||
// Bare-metal: ops/install.sh seeds this file at /etc/proxy/secrets.js on first
|
||||
// run (with placeholders for the values it can't guess) and points the
|
||||
// systemd unit's CONF_SECRETS env var at it. Fill in your values, then
|
||||
// `sudo systemctl restart proxy`. Values here override conf/base.js and win
|
||||
// over <environment>.js.
|
||||
//
|
||||
// Only the keys the app reads are listed below. The `stack` key is read by the
|
||||
// theta-env orchestrator (setup.sh) and ignored by the app.
|
||||
|
||||
Reference in New Issue
Block a user