24 Commits

Author SHA1 Message Date
stevensting 63d122855f Merge pull request 'fix db backups' (#5) from fix-backups into main
continuous-integration/drone/push Build is failing
Reviewed-on: #5
2026-06-16 18:52:50 +00:00
stevensting 52ca435ce5 Merge pull request 'chore: Configure Renovate' (#3) from renovate/configure into main
continuous-integration/drone/push Build is failing
Reviewed-on: #3
2026-06-16 18:52:31 +00:00
stevensting 7f343a96c4 fix db backups 2026-06-16 20:51:05 +02:00
knoflook fc6cece84e chore: publish 5.1.0+v6.1.0 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2026-04-09 17:00:35 +02:00
knoflook 2c53efc5fe chore: update image tags 2026-04-09 16:46:21 +02:00
decentral1se 542ff11abf Merge pull request 'Add instruction to make upload work' (#4) from jeppebundsgaard/listmonk:main into main
continuous-integration/drone/push Build is failing
Reviewed-on: #4
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2026-04-04 11:46:24 +00:00
jeppebundsgaard e6caad12ff Add instruction to make upload work 2026-04-04 10:00:52 +00:00
renovate-bot cfce5e6f79 Add renovate.json 2026-03-10 17:52:50 +00:00
stevensting 9251725aac update documentation regarding backup and readme
continuous-integration/drone/push Build is failing
2026-03-01 20:23:29 +00:00
knoflook 58e7c6cf8b chore: publish 5.0.0+v6.0.0 release
continuous-integration/drone/push Build is failing
2026-01-27 18:53:41 +01:00
knoflook b31122c149 chore: publish 4.1.0+v5.1.0 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2025-09-25 15:23:39 +02:00
3wordchant c7962a301f chore: publish 4.0.0+v5.0.1 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-06-04 18:18:37 +01:00
p4u1 43c842da64 chore: publish 3.4.2+v4.1.0 release
continuous-integration/drone/push Build is passing
2025-02-03 15:41:32 +01:00
p4u1 2fa1d541aa fix: Bumps config.toml version
The actual change was introduced in c0445167bd
2025-02-03 15:39:30 +01:00
javielico 23c629534d chore: publish 3.4.1+v4.1.0 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-01-18 15:40:32 +00:00
javielico e2d639f76f chore: publish 3.4.0+v4.1.0 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-01-18 15:26:37 +00:00
cas 7685e1ac20 Revert "Introduce automatic postgres upgrading"
continuous-integration/drone/push Build is passing
This reverts commit ebfe1d007b.
2025-01-08 14:54:54 -08:00
cas ebfe1d007b Introduce automatic postgres upgrading
continuous-integration/drone/push Build is failing
2025-01-08 14:46:18 -08:00
cas 0e034cc0d3 Update .drone.yml
continuous-integration/drone/push Build is failing
2025-01-08 10:09:13 -08:00
cas 321c4ea18b chore: publish 3.3.0+v4.1.0 release
continuous-integration/drone/tag Build is failing
continuous-integration/drone/push Build is passing
2025-01-08 09:56:12 -08:00
javielico df06560b35 chore: publish 3.2.0+v4.0.1 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2024-10-29 16:03:39 +00:00
javielico b8aff2476e Changes due to version 4 upgrade remove admin/user cred generation
continuous-integration/drone/push Build is passing
2024-10-29 15:57:33 +00:00
javielico c0445167bd Changes due to version 4 upgrade remove admin/user cred generation
continuous-integration/drone/push Build is passing
2024-10-29 15:54:10 +00:00
javielico 3635c83a40 chore: publish 3.1.0+v4.0.1 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2024-10-29 15:39:06 +00:00
9 changed files with 115 additions and 22 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag
-1
View File
@@ -4,4 +4,3 @@ DOMAIN=listmonk.example.com
LETS_ENCRYPT_ENV=production
SECRET_DB_PASSWORD_VERSION=v1
SECRET_ADMIN_PASSWORD_VERSION=v1
+3 -2
View File
@@ -7,8 +7,8 @@
* **Status**: 2, beta
* **Image**: [`listmonk/listmonk`](https://hub.docker.com/r/listmonk/listmonk/), 2, upstream
* **Healthcheck**: No
* **Backups**: No
* **Email**: ?
* **Backups**: Yes
* **Email**: Yes
* **Tests**: 2
* **SSO**: No
<!-- endmetadata -->
@@ -21,3 +21,4 @@
to save secrets in `pass`)
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to your Docker swarm box. Nothing to change apart from the DOMAIN at the moment.
5. `abra app deploy YOURAPPDOMAIN`
6. To make media uploads work, go to Settings->Media uploads and set upload path to "/uploads" and click the Save-button.
+2 -1
View File
@@ -1,2 +1,3 @@
export CONFIG_TOML_VERSION=v1
export CONFIG_TOML_VERSION=v2
export APP_ENTRYPOINT_VERSION=v1
export PG_BACKUP_VERSION=v2
+16 -15
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: listmonk/listmonk:v4.0.0
image: listmonk/listmonk:v6.1.0
networks:
- internal
- proxy
@@ -12,7 +12,6 @@ services:
- LISTMONK_DB_HOST=${STACK_NAME}_db
secrets:
- db_password
- admin_password
depends_on:
- db
configs:
@@ -32,12 +31,12 @@ services:
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=9000"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version=3.0.0+v4.0.0"
- "coop-cloud.${STACK_NAME}.version=5.1.0+v6.1.0"
volumes:
- "uploads:/uploads"
db:
image: postgres:13
image: postgres:18
networks:
- internal
secrets:
@@ -52,23 +51,22 @@ services:
timeout: 5s
retries: 6
volumes:
- "postgres_data:/var/lib/postgresql/data"
- "postgres:/var/lib/postgresql"
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: sh -c 'pg_dump -U "$$POSTGRES_USER" -Fc "$$POSTGRES_DB" | gzip > "/postgres.dump.gz"'
backupbot.backup.path: "/postgres.dump.gz"
backupbot.backup.post-hook: "rm -f /postgres.dump.gz"
backupbot.restore: "true"
backupbot.restore.post-hook: sh -c 'gzip -d /postgres.dump.gz && pg_restore --clean -U "$$POSTGRES_USER" --dbname="$$POSTGRES_DB" < /postgres.dump && rm -f /postgres.dump'
backupbot.backup: ${ENABLE_BACKUPS:-true}
backupbot.backup.volumes.postgres_data.path: "backup.sql"
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.restore.post-hook: '/pg_backup.sh restore'
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
secrets:
db_password:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
external: true
admin_password:
name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION}
external: true
configs:
config_toml:
@@ -78,6 +76,9 @@ configs:
app_entrypoint:
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
file: docker-entrypoint.sh
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh
networks:
internal:
@@ -85,5 +86,5 @@ networks:
external: true
volumes:
postgres_data:
postgres:
uploads:
-2
View File
@@ -1,7 +1,5 @@
[app]
address = "0.0.0.0:9000"
admin_username = "admin"
admin_password = "{{ secret "admin_password" }}"
# Database.
[db]
Executable
+70
View File
@@ -0,0 +1,70 @@
#!/bin/bash
set -e
BACKUP_PATH="/var/lib/postgresql/data"
LATEST_BACKUP_FILE="${BACKUP_PATH}/backup.sql"
function backup {
FILE_WITH_DATE="${BACKUP_PATH}/backup_$(date +%F).sql"
if [ -f "$POSTGRES_PASSWORD_FILE" ]; then
export PGPASSWORD=$(cat "$POSTGRES_PASSWORD_FILE")
fi
echo "Creating backup at ${FILE_WITH_DATE}..."
pg_dump -U "${POSTGRES_USER:-postgres}" "${POSTGRES_DB:-postgres}" > "${FILE_WITH_DATE}"
echo "Copying to ${LATEST_BACKUP_FILE}..."
cp -f "${FILE_WITH_DATE}" "${LATEST_BACKUP_FILE}"
echo "Backup done. You will find it at ${LATEST_BACKUP_FILE}"
}
function restore {
echo "Restoring database from ${LATEST_BACKUP_FILE}..."
cd ${BACKUP_PATH}
function restore_config {
echo "Restoring original pg_hba.conf configuration..."
cat pg_hba.conf.bak > pg_hba.conf
su postgres -c 'pg_ctl reload'
}
# Don't allow any other connections than local
echo "Setting up temporary pg_hba.conf to only allow local connections..."
cp pg_hba.conf pg_hba.conf.bak
echo "local all all trust" > pg_hba.conf
su postgres -c 'pg_ctl reload'
trap restore_config EXIT INT TERM
# Recreate Database
echo "Dropping existing database ${POSTGRES_DB:-postgres}..."
psql -U "${POSTGRES_USER:-postgres}" -d postgres -c "DROP DATABASE \"${POSTGRES_DB:-postgres}\" WITH (FORCE);"
echo "Creating fresh database ${POSTGRES_DB:-postgres}..."
createdb -U "${POSTGRES_USER:-postgres}" "${POSTGRES_DB:-postgres}"
echo "Restoring data from ${LATEST_BACKUP_FILE}..."
psql -U "${POSTGRES_USER:-postgres}" -d "${POSTGRES_DB:-postgres}" -1 -f "${LATEST_BACKUP_FILE}"
trap - EXIT INT TERM
restore_config
echo "Database restore completed successfully."
}
# Execute the function passed as argument
case "$1" in
backup)
backup
;;
restore)
restore
;;
*)
echo "Usage: $0 {backup|restore}"
exit 1
;;
esac
+17
View File
@@ -0,0 +1,17 @@
!!! Postgres major version upgrade and volume change !!!
We're bumping from postgres 13 to 18 and the storage location of files has
changed from /var/lib/postgres/data to /var/lib/postgres/18. Volume was
adjusted accordingly. Take a dump of DB before the upgrade by running
pg_dump -U listmonk -Fc -b -f /var/lib/postgres/data/dump
in the db container of the app. Then pull this file out from the docker volume
Then deploy the new version of the app. Next, copy the dump that you just
made into new volume /var/lib/docker/volumes/your_app_name_postgres/_data/dump
After that you can run
pg_restore --clean -U listmonk -d listmonk /var/lib/postgres/dump
Afterwards you should restart the db container and it should be all good.
+6
View File
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}