Compare commits

...
4 Commits
Author SHA1 Message Date
sam d49918ae76 chore(release): v1.47.1
deploy / gate (push) Failing after 5m40s
deploy / build-and-push (push) Skipped
deploy / dist-zip (push) Skipped
2026-10-06 03:05:39 +11:00
sam 8cb5391035 docs(news): regenerate for the corrected 1.47.0 notes 2026-10-06 03:04:35 +11:00
sam ab9db7cfe3 feat(install): bundled PostgreSQL has no network and is reached by Unix socket; print an AppArmor profile instead of disabling the userns restriction 2026-10-06 03:04:12 +11:00
sam 3d02d1d2d9 fix(install): do not start the services when the bundled PostgreSQL failed to start 2026-10-06 02:38:56 +11:00
10 changed files with 95 additions and 26 deletions

No files matched your search

+1 -1
View File
@@ -350,7 +350,7 @@ jobs:
for cmd in $(jq -r '.required_topology.units[]' release.json); do for cmd in $(jq -r '.required_topology.units[]' release.json); do
cp "dist/$cmd" "$name/" cp "dist/$cmd" "$name/"
done done
cp deployments/INSTRUCTIONS.md CHANGELOG.md docker-compose.yml "$name/" cp deployments/INSTRUCTIONS.md CHANGELOG.md "$name/"
cp scripts/archie-update-* "$name/" cp scripts/archie-update-* "$name/"
digest='${{ needs.build-and-push.outputs.agent_digest }}' digest='${{ needs.build-and-push.outputs.agent_digest }}'
test -n "$digest" test -n "$digest"
+9 -1
View File
@@ -5,6 +5,14 @@ release's per-component sections are labelled beneath its heading.
## [Unreleased] ## [Unreleased]
## [1.47.1] - 2026-10-06
### archied
- The bundled PostgreSQL has no network and publishes no port: the services reach it through its Unix socket under `~/.local/share/archie/postgres`, so it no longer collides with another PostgreSQL on 5432. Leaving the database question blank in `archied setup` selects it.
- The installer does not start the services when the bundled PostgreSQL fails to start; it names the command to read its logs.
- On hosts that restrict unprivileged user namespaces (Ubuntu 23.10+), the installer prints an AppArmor profile allowing them for the Archie binaries only.
## [1.47.0] - 2026-10-06 ## [1.47.0] - 2026-10-06
### archied ### archied
@@ -13,7 +21,7 @@ release's per-component sections are labelled beneath its heading.
- `archied setup` asks for the PostgreSQL URL. Left blank, it uses the bundled Compose database with a generated password stored in `~/.config/archie/env` as `PGPASSWORD`, not in `config.toml`. - `archied setup` asks for the PostgreSQL URL. Left blank, it uses the bundled Compose database with a generated password stored in `~/.config/archie/env` as `PGPASSWORD`, not in `config.toml`.
- The bundled PostgreSQL listens on 127.0.0.1 only. A database created before this release keeps its old `archie` password; enter its URL at setup or recreate the volume. - The bundled PostgreSQL listens on 127.0.0.1 only. A database created before this release keeps its old `archie` password; enter its URL at setup or recreate the volume.
- The release zip carries `docker-compose.yml`. - The release zip carries `docker-compose.yml`.
- Extensions need unprivileged user namespaces. On Ubuntu 23.10 and later run `sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0` or extensions fail to start. - Extensions need unprivileged user namespaces, which Ubuntu 23.10 and later restrict. Allow them for the Archie binaries with an AppArmor profile; from the next release the installer prints it. Do not disable the restriction system-wide.
- fix(app): assign the temp-file close result on the error path - fix(app): assign the temp-file close result on the error path
- fix(webhook): set a ReadHeaderTimeout on the forge webhook receivers - fix(webhook): set a ReadHeaderTimeout on the forge webhook receivers
- fix(forge): refuse a review line number that does not fit an int - fix(forge): refuse a review line number that does not fit an int
+3 -2
View File
@@ -117,8 +117,9 @@ or a hosted provider API key.
checkout instead. Re-run `archied setup` at any time to change the answers. checkout instead. Re-run `archied setup` at any time to change the answers.
Extensions run in an unprivileged user namespace. Ubuntu 23.10 and later Extensions run in an unprivileged user namespace. Ubuntu 23.10 and later
block these by default; allow them with block these by default; on such a host the installer prints an AppArmor
`sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0`. profile that allows them for the Archie binaries only, to install with
`sudo`.
2. **Check it is up.** 2. **Check it is up.**
+1 -3
View File
@@ -25,9 +25,7 @@ services:
image: postgres:18 image: postgres:18
environment: environment:
POSTGRES_USER: archie POSTGRES_USER: archie
# archied setup generates PGPASSWORD into ~/.config/archie/env; the fallback is POSTGRES_PASSWORD: archie
# the dev password deployments/dev.toml uses.
POSTGRES_PASSWORD: ${PGPASSWORD:-archie}
POSTGRES_DB: archie POSTGRES_DB: archie
# postgres:18 moved its default PGDATA under a versioned path; pin the # postgres:18 moved its default PGDATA under a versioned path; pin the
# classic location so the named volume keeps working across image updates. # classic location so the named volume keeps working across image updates.
+2
View File
@@ -62,6 +62,7 @@
"/news/archie/1.45.0/": "/news/1.45.0/", "/news/archie/1.45.0/": "/news/1.45.0/",
"/news/archie/1.46.0/": "/news/1.46.0/", "/news/archie/1.46.0/": "/news/1.46.0/",
"/news/archie/1.47.0/": "/news/1.47.0/", "/news/archie/1.47.0/": "/news/1.47.0/",
"/news/archie/1.47.1/": "/news/1.47.1/",
"/news/archie/1.5.0/": "/news/1.5.0/", "/news/archie/1.5.0/": "/news/1.5.0/",
"/news/archie/1.6.0/": "/news/1.6.0/", "/news/archie/1.6.0/": "/news/1.6.0/",
"/news/archie/1.7.0/": "/news/1.7.0/", "/news/archie/1.7.0/": "/news/1.7.0/",
@@ -141,6 +142,7 @@
"/news/archied/1.45.0/": "/news/1.45.0/", "/news/archied/1.45.0/": "/news/1.45.0/",
"/news/archied/1.46.0/": "/news/1.46.0/", "/news/archied/1.46.0/": "/news/1.46.0/",
"/news/archied/1.47.0/": "/news/1.47.0/", "/news/archied/1.47.0/": "/news/1.47.0/",
"/news/archied/1.47.1/": "/news/1.47.1/",
"/news/archied/1.5.0/": "/news/1.5.0/", "/news/archied/1.5.0/": "/news/1.5.0/",
"/news/archied/1.6.0/": "/news/1.6.0/", "/news/archied/1.6.0/": "/news/1.6.0/",
"/news/archied/1.7.0/": "/news/1.7.0/", "/news/archied/1.7.0/": "/news/1.7.0/",
+6 -1
View File
@@ -1,8 +1,13 @@
[ [
{
"version": "1.47.1",
"date": "2026-10-06",
"body": "### archied\n\n- The bundled PostgreSQL has no network and publishes no port: the services reach it through its Unix socket under `~/.local/share/archie/postgres`, so it no longer collides with another PostgreSQL on 5432. Leaving the database question blank in `archied setup` selects it.\n- The installer does not start the services when the bundled PostgreSQL fails to start; it names the command to read its logs.\n- On hosts that restrict unprivileged user namespaces (Ubuntu 23.10+), the installer prints an AppArmor profile allowing them for the Archie binaries only."
},
{ {
"version": "1.47.0", "version": "1.47.0",
"date": "2026-10-06", "date": "2026-10-06",
"body": "### archied\n\n- Install with one command: `curl -fsSL https://raw.githubusercontent.com/samcharles93/archie-core/main/install.sh | bash` downloads this release, verifies its checksum and runs `archied setup`. `--from-source` builds a checkout instead.\n- `archied setup` asks for the PostgreSQL URL. Left blank, it uses the bundled Compose database with a generated password stored in `~/.config/archie/env` as `PGPASSWORD`, not in `config.toml`.\n- The bundled PostgreSQL listens on 127.0.0.1 only. A database created before this release keeps its old `archie` password; enter its URL at setup or recreate the volume.\n- The release zip carries `docker-compose.yml`.\n- Extensions need unprivileged user namespaces. On Ubuntu 23.10 and later run `sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0` or extensions fail to start.\n- fix(app): assign the temp-file close result on the error path\n- fix(webhook): set a ReadHeaderTimeout on the forge webhook receivers\n- fix(forge): refuse a review line number that does not fit an int\n- fix(storepkg): mask the tar mode to the permission bits before narrowing\n- fix(webui): navigate the Events chain once, not twice\n- feat(tools): fail the gate when docs cite a path that no longer exists\n- fix(webhookguard): verify uppercase-hex HMAC signatures\n- fix(configuration): make bot_user required, defaulted, and named\n- feat(workflow): add the command.run step type\n- fix(controlplane): an absent MCP server field inherits the file value\n- fix(build): restore the go fix fixpoint, and give the formatter one owner\n- fix(archied): restore contextcheck directives and drop unused adapter\n- feat(secretengine): serve secret engines as go-plugin extensions\n- refactor(statestore): own package for the State Store service; access reset moves to archie-state-store\n- refactor(archied): gateway owns model work; daemon drops chat runtime, tools, memory and curators\n- refactor(archiegateway): own package for the Gateway service\n- fix(services): services wait for peers instead of exiting; restarted broker keeps its endpoint\n- refactor(archieplaybooks): fold archie-playbooks into archied playbooks lint|serve\n- refactor(agentrun): agent stage contract moves to the domain layer\n- refactor(agentexec): model loop moves to agentexec/modelloop\n- fix(configuration): bindings encryption keys must use the env engine\n- feat(storepkg): fetch packages from any registry, plain HTTP on loopback only\n- feat(webui): install, accept and enable extensions from the dashboard\n- feat(presence): every service re-stamps a presence record in the State Store\n- refactor(plugin): delete Yaegi daemon plugins and plugin_dir\n- refactor(module): the log action is built in; delete the module loader and reconciler\n- refactor(skill): delete Yaegi skill scripts and the run_go_script tool\n- refactor(examples): the firewall workflow moves to archipelago\n- feat(presence): services card on the status page and archied status\n- feat(archiemessaging): verify update reports against archied's presence and restore release announcements\n- fix(configuration): an overlay stands in for a missing config file; dev overlay is complete\n- feat(access): edit org, workspace and object policies from the dashboard; refuse owner lockout\n- feat(access): instance network rules at the capture receiver; policies reload without a restart\n- feat(staterpc): attribute State Store calls to the calling service; policy audit records it\n- feat(controlplane): playbooks and agent profiles install from packages; the daemon reads eda-playbooks live\n- feat(forgeext): forge surface served by extensions; forge.type names the installed package\n- refactor(forge): github and gitea leave core; webhooks parse in the forge extension\n- feat(staterpc): the State Store derives org and actor from the principal archie-ui forwards\n- feat(channelext): chat channels served by extensions; messaging runs the enabled ones\n- refactor(channels): webhook and email run only as extensions; their channel settings go\n- feat(skills): skill packages project into a skills resource the gateway reads live\n- fix(gatewayrpc): sender_id and rate_limited cross the chat wire\n- fix(controlplane): change history names kinds and reads only the caller's org\n- feat(contracts)!: requests no longer name their org; the State Store derives it from the caller\n- feat(identity): personal API tokens, created and revoked from the dashboard, act as their owner\n- fix(archieui): a sign-in provider outage is a health issue, not a startup failure\n- feat(staterpc): one run credential per task, kept in the State Store, authorizes its store calls and its push\n- fix(forgerpc): forge calls need the run credential and reach only the run's own repository\n- feat(controlplane): identity credential grants edited from the dashboard and applied live\n- feat(daemon): a workflow that names an identity runs as it; the dispatcher needs run on the workflow\n- feat(staterpc): eveLine truncated "body": "### archied\n\n- Install with one command: `curl -fsSL https://raw.githubusercontent.com/samcharles93/archie-core/main/install.sh | bash` downloads this release, verifies its checksum and runs `archied setup`. `--from-source` builds a checkout instead.\n- `archied setup` asks for the PostgreSQL URL. Left blank, it uses the bundled Compose database with a generated password stored in `~/.config/archie/env` as `PGPASSWORD`, not in `config.toml`.\n- The bundled PostgreSQL listens on 127.0.0.1 only. A database created before this release keeps its old `archie` password; enter its URL at setup or recreate the volume.\n- The release zip carries `docker-compose.yml`.\n- Extensions need unprivileged user namespaces, which Ubuntu 23.10 and later restrict. Allow them for the Archie binaries with an AppArmor profile; from the next release the installer prints it. Do not disable the restriction system-wide.\n- fix(app): assign the temp-file close result on the error path\n- fix(webhook): set a ReadHeaderTimeout on the forge webhook receivers\n- fix(forge): refuse a review line number that does not fit an int\n- fix(storepkg): mask the tar mode to the permission bits before narrowing\n- fix(webui): navigate the Events chain once, not twice\n- feat(tools): fail the gate when docs cite a path that no longer exists\n- fix(webhookguard): verify uppercase-hex HMAC signatures\n- fix(configuration): make bot_user required, defaulted, and named\n- feat(workflow): add the command.run step type\n- fix(controlplane): an absent MCP server field inherits the file value\n- fix(build): restore the go fix fixpoint, and give the formatter one owner\n- fix(archied): restore contextcheck directives and drop unused adapter\n- feat(secretengine): serve secret engines as go-plugin extensions\n- refactor(statestore): own package for the State Store service; access reset moves to archie-state-store\n- refactor(archied): gateway owns model work; daemon drops chat runtime, tools, memory and curators\n- refactor(archiegateway): own package for the Gateway service\n- fix(services): services wait for peers instead of exiting; restarted broker keeps its endpoint\n- refactor(archieplaybooks): fold archie-playbooks into archied playbooks lint|serve\n- refactor(agentrun): agent stage contract moves to the domain layer\n- refactor(agentexec): model loop moves to agentexec/modelloop\n- fix(configuration): bindings encryption keys must use the env engine\n- feat(storepkg): fetch packages from any registry, plain HTTP on loopback only\n- feat(webui): install, accept and enable extensions from the dashboard\n- feat(presence): every service re-stamps a presence record in the State Store\n- refactor(plugin): delete Yaegi daemon plugins and plugin_dir\n- refactor(module): the log action is built in; delete the module loader and reconciler\n- refactor(skill): delete Yaegi skill scripts and the run_go_script tool\n- refactor(examples): the firewall workflow moves to archipelago\n- feat(presence): services card on the status page and archied status\n- feat(archiemessaging): verify update reports against archied's presence and restore release announcements\n- fix(configuration): an overlay stands in for a missing config file; dev overlay is complete\n- feat(access): edit org, workspace and object policies from the dashboard; refuse owner lockout\n- feat(access): instance network rules at the capture receiver; policies reload without a restart\n- feat(staterpc): attribute State Store calls to the calling service; policy audit records it\n- feat(controlplane): playbooks and agent profiles install from packages; the daemon reads eda-playbooks live\n- feat(forgeext): forge surface served by extensions; forge.type names the installed package\n- refactor(forge): github and gitea leave core; webhooks parse in the forge extension\n- feat(staterpc): the State Store derives org and actor from the principal archie-ui forwards\n- feat(channelext): chat channels served by extensions; messaging runs the enabled ones\n- refactor(channels): webhook and email run only as extensions; their channel settings go\n- feat(skills): skill packages project into a skills resource the gateway reads live\n- fix(gatewayrpc): sender_id and rate_limited cross the chat wire\n- fix(controlplane): change history names kinds and reads only the caller's org\n- feat(contracts)!: requests no longer name their org; the State Store derives it from the caller\n- feat(identity): personal API tokens, created and revoked from the dashboard, act as their owner\n- fix(archieui): a sign-in provider outage is a health issue, not a startup failure\n- feat(staterpc): one run credential per task, kept in the State Store, authorizes its store calls and its push\n- fix(forgerpc): forge calls need the run credential and reach only the run's own repository\n- feat(controlplane): identity credential grants edited from the dashboard and applied live\n- feat(daemon): a workflow that names an identity runs asLine truncated
}, },
{ {
"version": "1.46.0", "version": "1.46.0",
+61 -13
View File
@@ -89,8 +89,8 @@ fi
mkdir -p "${ARCHIE_CONFIG_DIR}" "${ARCHIE_DATA_DIR}" "${ARCHIE_BIN_DIR}" mkdir -p "${ARCHIE_CONFIG_DIR}" "${ARCHIE_DATA_DIR}" "${ARCHIE_BIN_DIR}"
# 2. Binaries. STAGE ends up holding the binaries, release.json, the updater # 2. Binaries. STAGE ends up holding the binaries, release.json and the
# scripts and docker-compose.yml, whichever way they were obtained. # updater scripts, whichever way they were obtained.
TMP="$(mktemp -d)" TMP="$(mktemp -d)"
trap 'rm -rf "${TMP}"' EXIT trap 'rm -rf "${TMP}"' EXIT
@@ -111,7 +111,7 @@ if [ "${FROM_SOURCE}" = true ]; then
for cmd in $(jq -er '.required_topology.units | join(" ")' "${SRC_DIR}/release.json"); do for cmd in $(jq -er '.required_topology.units | join(" ")' "${SRC_DIR}/release.json"); do
(cd "${SRC_DIR}" && go build -ldflags "${LDFLAGS}" -o "${STAGE}/${cmd}" "./cmd/${cmd}") (cd "${SRC_DIR}" && go build -ldflags "${LDFLAGS}" -o "${STAGE}/${cmd}" "./cmd/${cmd}")
done done
cp "${SRC_DIR}/release.json" "${SRC_DIR}/docker-compose.yml" "${SRC_DIR}"/scripts/archie-update-* "${STAGE}/" cp "${SRC_DIR}/release.json" "${SRC_DIR}"/scripts/archie-update-* "${STAGE}/"
else else
if [ -z "${VERSION}" ]; then if [ -z "${VERSION}" ]; then
tag="$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')" tag="$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')"
@@ -138,7 +138,6 @@ for cmd in ${TOPOLOGY_UNITS}; do
install -m755 "${STAGE}/${cmd}" "${ARCHIE_BIN_DIR}/${cmd}" install -m755 "${STAGE}/${cmd}" "${ARCHIE_BIN_DIR}/${cmd}"
done done
install -m755 "${STAGE}"/archie-update-* "${ARCHIE_BIN_DIR}/" install -m755 "${STAGE}"/archie-update-* "${ARCHIE_BIN_DIR}/"
install -m644 "${STAGE}/docker-compose.yml" "${ARCHIE_DATA_DIR}/docker-compose.yml"
echo " Installed ${TOPOLOGY_UNITS} and the updater to ${ARCHIE_BIN_DIR}/" echo " Installed ${TOPOLOGY_UNITS} and the updater to ${ARCHIE_BIN_DIR}/"
# 3. Configuration. archied setup asks every question and writes config.toml # 3. Configuration. archied setup asks every question and writes config.toml
@@ -161,17 +160,66 @@ else
echo " [SKIP] ${ARCHIE_CONFIG_DIR}/config.toml already exists. Re-run 'archied setup' to change it." echo " [SKIP] ${ARCHIE_CONFIG_DIR}/config.toml already exists. Re-run 'archied setup' to change it."
fi fi
# 4. PostgreSQL. Every service fails closed without it. The default database_url is # 4. PostgreSQL. Every service fails closed without it. The bundled database
# the Compose postgres service, so start it when the config still uses it. # has no network at all: the services reach it through its Unix socket,
if ! grep -qE '@127\.0\.0\.1:5432/archie' "${ARCHIE_CONFIG_DIR}/config.toml"; then # mounted at PG_SOCKET_DIR, so it publishes no port and cannot collide with
# another PostgreSQL. Its password is the PGPASSWORD setup generated.
PG_SOCKET_DIR="${ARCHIE_DATA_DIR}/postgres"
PG_COMPOSE="${ARCHIE_DATA_DIR}/postgres.yml"
if ! grep -qF "host=${PG_SOCKET_DIR}" "${ARCHIE_CONFIG_DIR}/config.toml"; then
echo " [OK] Using the PostgreSQL server named by database_url." echo " [OK] Using the PostgreSQL server named by database_url."
elif command -v docker &>/dev/null && [ -f "${ARCHIE_DATA_DIR}/docker-compose.yml" ]; then elif ! command -v docker &>/dev/null; then
echo "==> Starting PostgreSQL 18 (docker compose up -d postgres)..." echo " [WARN] Docker not found: the bundled PostgreSQL needs it. Install Docker, or run 'archied setup' with your own PostgreSQL 18 URL." >&2
touch "${ENV_FILE}" && chmod 600 "${ENV_FILE}" AUTO_START=false
docker compose --env-file "${ENV_FILE}" -f "${ARCHIE_DATA_DIR}/docker-compose.yml" up -d postgres ||
echo " [WARN] Could not start PostgreSQL. Start it before the services, or point database_url at your own PostgreSQL 18."
else else
echo " [WARN] Docker not found: point database_url in ${ARCHIE_CONFIG_DIR}/config.toml at a PostgreSQL 18 server before starting the services." echo "==> Starting the bundled PostgreSQL 18..."
mkdir -p "${PG_SOCKET_DIR}"
cat >"${PG_COMPOSE}" <<'EOF'
services:
postgres:
image: postgres:18
network_mode: none
environment:
POSTGRES_USER: archie
POSTGRES_PASSWORD: ${PGPASSWORD:-}
POSTGRES_DB: archie
POSTGRES_INITDB_ARGS: --auth-local=scram-sha-256
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- pg_data:/var/lib/postgresql/data
# :z relabels the directory for SELinux hosts.
- ./postgres:/var/run/postgresql:z
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U archie -d archie"]
interval: 5s
timeout: 5s
retries: 10
volumes:
pg_data:
EOF
if ! docker compose -p archie --env-file "${ENV_FILE}" -f "${PG_COMPOSE}" up -d --wait; then
echo " [WARN] The bundled PostgreSQL did not start, so the services are installed but not started." >&2
echo " Check: docker compose -p archie -f ${PG_COMPOSE} logs" >&2
AUTO_START=false
fi
fi
# Extensions run in an unprivileged user namespace. Ubuntu 23.10+ forbids
# those unless an AppArmor profile allows them, and only root can add one, so
# print the profile that allows it for these binaries alone.
if [ "$(cat /proc/sys/kernel/apparmor_restrict_unprivileged_userns 2>/dev/null)" = 1 ]; then
echo " [WARN] This host restricts user namespaces, so extensions will not start until you run:" >&2
cat >&2 <<EOF
sudo tee /etc/apparmor.d/archie >/dev/null <<'PROFILE'
abi <abi/4.0>,
include <tunables/global>
profile archie ${ARCHIE_BIN_DIR}/archie{d,-*} flags=(unconfined) {
userns,
}
PROFILE
sudo apparmor_parser -r /etc/apparmor.d/archie
EOF
fi fi
# 5. Systemd user service setup & linger configuration # 5. Systemd user service setup & linger configuration
@@ -161,6 +161,12 @@ func DefaultWorkDir() string {
return filepath.Join(xdgDataHome(), "archie", "work") return filepath.Join(xdgDataHome(), "archie", "work")
} }
// DefaultPostgresSocketDir is where the bundled PostgreSQL's Unix socket is
// mounted on the host.
func DefaultPostgresSocketDir() string {
return filepath.Join(xdgDataHome(), "archie", "postgres")
}
// DefaultConfigDir returns the directory archie's configuration lives in: // DefaultConfigDir returns the directory archie's configuration lives in:
// $XDG_CONFIG_HOME/archie, or ~/.config/archie. It is the base every // $XDG_CONFIG_HOME/archie, or ~/.config/archie. It is the base every
// config-home-derived path is built on. It is not the -config source // config-home-derived path is built on. It is not the -config source
@@ -10,6 +10,7 @@ import (
"strings" "strings"
"github.com/samcharles93/archie-core/internal/config" "github.com/samcharles93/archie-core/internal/config"
"github.com/samcharles93/archie-core/internal/infrastructure/configuration"
"github.com/samcharles93/archie-core/internal/infrastructure/configuration/tomlwrite" "github.com/samcharles93/archie-core/internal/infrastructure/configuration/tomlwrite"
) )
@@ -144,9 +145,9 @@ func RunParams(ctx context.Context, p Prompter, discovery ModelDiscovery, secret
} }
// stepDatabase returns the PostgreSQL URL. A blank answer on a fresh install // stepDatabase returns the PostgreSQL URL. A blank answer on a fresh install
// means the bundled Compose database with a generated password. The password // means the bundled database: no network, reached through its Unix socket, with
// goes only to the env file as PGPASSWORD, which pgx and Compose both read, so // a generated password that goes only to the env file as PGPASSWORD, which pgx
// config.toml holds no secret. // and Compose both read, so config.toml holds no secret.
func stepDatabase(ctx context.Context, p Prompter, secrets SecretSink, existing, param string) (string, error) { func stepDatabase(ctx context.Context, p Prompter, secrets SecretSink, existing, param string) (string, error) {
if strings.TrimSpace(param) != "" { if strings.TrimSpace(param) != "" {
return param, nil return param, nil
@@ -170,5 +171,5 @@ func stepDatabase(ctx context.Context, p Prompter, secrets SecretSink, existing,
if err := secrets.Put("env", "PGPASSWORD", password); err != nil { if err := secrets.Put("env", "PGPASSWORD", password); err != nil {
return "", fmt.Errorf("setup: store database password: %w", err) return "", fmt.Errorf("setup: store database password: %w", err)
} }
return "postgres://archie@127.0.0.1:5432/archie?sslmode=disable", nil return "postgres://archie@/archie?host=" + configuration.DefaultPostgresSocketDir(), nil
} }
+1 -1
View File
@@ -93,7 +93,7 @@ archied_dirs() {
printf '%s\n' "cmd/archied" "Dockerfile.archied" "cmd/archie-ui" "internal/app/archieui" \ printf '%s\n' "cmd/archied" "Dockerfile.archied" "cmd/archie-ui" "internal/app/archieui" \
"Taskfile.yml" ".github/workflows/deploy.yml" "install.sh" \ "Taskfile.yml" ".github/workflows/deploy.yml" "install.sh" \
"scripts/archie-update-install" "scripts/archie-update-check" \ "scripts/archie-update-install" "scripts/archie-update-check" \
"scripts/archie-update-watchdog" "deployments/INSTRUCTIONS.md" "docker-compose.yml" "scripts/archie-update-watchdog" "deployments/INSTRUCTIONS.md"
} }
# The UI Service ships with the archied release on purpose (archie-ui shares # The UI Service ships with the archied release on purpose (archie-ui shares