update: the api backs up before migrating; scripts/update.sh for compose installs

Docker only, never bare metal (owner, 2026-10-21). A new version with pending migrations backs
up first (database, voicemail, sounds, MOH) and stops if it can't (SKIP_BACKUP_BEFORE_MIGRATE
to override). update.sh: checks, changelog, backup (node dist/backup-cli.js), log compaction,
build while the old version runs, restart, self-check, and rollback with restore. Container
logs capped in compose. Admin guide: Updating, for compose and Portainer.
This commit is contained in:
iamdoubz committed 2026-10-21 11:15:40 -05:00
1 parent 8d5475cfbf
commit 54e1e201a1
9 files changed
+376 -6

No files matched your search

+9
View File
@@ -1,6 +1,11 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
name: selfphoneng
# Container logs (docker compose logs): 3 files of 10 MB each, then the oldest goes.
x-logging: &logging
driver: json-file
options: { max-size: 10m, max-file: '3' }
x-shared-volumes: &shared-volumes
- ./data/asterisk-generated:/etc/asterisk/selfphoneng
- ./data/voicemail:/var/spool/asterisk/voicemail
@@ -12,6 +17,7 @@ services:
postgres:
image: postgres:18-alpine
restart: unless-stopped
logging: *logging
environment:
POSTGRES_DB: selfphoneng
POSTGRES_USER: selfphoneng
@@ -32,6 +38,7 @@ services:
ASTERISK_UID: ${APP_UID:-1000}
ASTERISK_GID: ${APP_GID:-1000}
restart: unless-stopped
logging: *logging
network_mode: host
environment:
AMI_SECRET: ${AMI_SECRET:?set in .env}
@@ -51,6 +58,7 @@ services:
context: .
dockerfile: apps/api/Dockerfile
restart: unless-stopped
logging: *logging
network_mode: host
user: '${APP_UID:-1000}:${APP_GID:-1000}'
depends_on:
@@ -75,6 +83,7 @@ services:
image: caddy:2
profiles: ['caddy']
restart: unless-stopped
logging: *logging
network_mode: host
environment:
PUBLIC_HOSTNAME: ${PUBLIC_HOSTNAME:?set in .env}