Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b31758e23d |
@@ -15,6 +15,3 @@ FRONTEND_ORIGIN=http://localhost:8081
|
||||
# Set DEV_MODE=true and MAX_MESSAGES=1000 to test against a large mailbox.
|
||||
DEV_MODE=false
|
||||
MAX_MESSAGES=0
|
||||
|
||||
# Nightly DB backup rotation (days of dumps to keep in ./backups)
|
||||
BACKUP_KEEP_DAYS=7
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
name: Renovate
|
||||
|
||||
# RECOMMENDATIONS #2: automated dependency-update PRs (NuGet, npm, Dockerfiles, Actions)
|
||||
# that ride the existing required CI gates. Runs weekly + on demand.
|
||||
#
|
||||
# ONE-TIME SETUP (manual): create a Gitea personal access token with scopes
|
||||
# repo (rw) + user (r) + issue (rw) + organization (r), and add it as the Actions
|
||||
# secret RENOVATE_TOKEN (repo Settings -> Actions -> Secrets). Without the secret this
|
||||
# workflow fails fast with a clear message. See https://docs.renovatebot.com/modules/platform/gitea/
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 4 * * 1' # Mondays 04:30 UTC
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Require RENOVATE_TOKEN
|
||||
run: |
|
||||
if [ -z "${{ secrets.RENOVATE_TOKEN }}" ]; then
|
||||
echo "RENOVATE_TOKEN secret is not set — see the comment at the top of this workflow." >&2
|
||||
exit 1
|
||||
fi
|
||||
- name: Run Renovate
|
||||
uses: https://github.com/renovatebot/github-action@v40.3.6
|
||||
with:
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
env:
|
||||
RENOVATE_PLATFORM: gitea
|
||||
RENOVATE_ENDPOINT: https://git.cesnimda.uk/api/v1
|
||||
RENOVATE_REPOSITORIES: cesnimda/Inboxintel
|
||||
RENOVATE_ONBOARDING: "false"
|
||||
RENOVATE_REQUIRE_CONFIG: optional
|
||||
LOG_LEVEL: info
|
||||
@@ -21,9 +21,6 @@ frontend/.vite/
|
||||
appsettings.*.local.json
|
||||
secrets.json
|
||||
|
||||
## DB backups (never commit dumps)
|
||||
backups/
|
||||
|
||||
## Logs
|
||||
logs/
|
||||
*.log
|
||||
|
||||
+1
-3
@@ -29,9 +29,7 @@ reverse proxy.
|
||||
mitigate (a third party reading the DB files) reduces to "someone with access to your
|
||||
machine" — mitigate it at the layer that actually works:
|
||||
- **Use full-disk or volume encryption** on the host (BitLocker/LUKS) — strongly recommended.
|
||||
- **Encrypt backups**: nightly `pg_dump` rotation runs via the compose `backup` service
|
||||
into `./backups/` (git-ignored) — keep that directory on an encrypted disk and copy it
|
||||
off-machine. Restore: `docker compose exec -T postgres psql -U inboxintel -d inboxintel < backups/<file>.sql`.
|
||||
- **Encrypt backups** of the `pgdata` volume the same way.
|
||||
- Before any **multi-user** deployment, revisit per the multi-provider security design
|
||||
(host admins must not be able to read members' mail — plaintext bodies break that promise).
|
||||
2. **DB connection is not TLS** — Postgres is only reachable on the compose-internal network /
|
||||
|
||||
@@ -22,37 +22,6 @@ services:
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
# Nightly logical backups (RECOMMENDATIONS #3 — previously there were NONE). Dumps
|
||||
# rotate after BACKUP_KEEP_DAYS. The ./backups host directory should live on an
|
||||
# encrypted disk and be included in your off-machine backup regime (see SECURITY.md).
|
||||
# Restore: docker compose exec -T postgres psql -U inboxintel -d inboxintel < backups/<file>.sql
|
||||
backup:
|
||||
image: pgvector/pgvector:pg16
|
||||
entrypoint: /bin/sh
|
||||
command:
|
||||
- -c
|
||||
- |
|
||||
while true; do
|
||||
ts=$$(date -u +%Y%m%d-%H%M%S)
|
||||
if pg_dump -h postgres -U inboxintel -d inboxintel > /backups/inboxintel-$$ts.sql.tmp; then
|
||||
mv /backups/inboxintel-$$ts.sql.tmp /backups/inboxintel-$$ts.sql
|
||||
echo "backup OK: inboxintel-$$ts.sql"
|
||||
else
|
||||
rm -f /backups/inboxintel-$$ts.sql.tmp
|
||||
echo "backup FAILED at $$ts" >&2
|
||||
fi
|
||||
find /backups -name 'inboxintel-*.sql' -mtime +$${BACKUP_KEEP_DAYS:-7} -delete
|
||||
sleep 86400
|
||||
done
|
||||
environment:
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in deploy/.env}
|
||||
BACKUP_KEEP_DAYS: ${BACKUP_KEEP_DAYS:-7}
|
||||
volumes:
|
||||
- ./backups:/backups
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:recommended"],
|
||||
"timezone": "Europe/Berlin",
|
||||
"schedule": ["before 6am on monday"],
|
||||
"labels": ["dependencies"],
|
||||
"prConcurrentLimit": 5,
|
||||
"commitMessagePrefix": "chore(deps):",
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Group safe minor+patch updates into one weekly PR per ecosystem",
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"groupName": "{{manager}} minor & patch"
|
||||
},
|
||||
{
|
||||
"description": "Major updates stay individual PRs for careful review",
|
||||
"matchUpdateTypes": ["major"],
|
||||
"dependencyDashboardApproval": true
|
||||
}
|
||||
],
|
||||
"vulnerabilityAlerts": {
|
||||
"enabled": true,
|
||||
"labels": ["security"],
|
||||
"schedule": ["at any time"]
|
||||
},
|
||||
"ignorePaths": ["**/node_modules/**", "**/bin/**", "**/obj/**"]
|
||||
}
|
||||
Reference in New Issue
Block a user