Compare commits

9 Commits

Author SHA1 Message Date
Nick Stokoe
155abad7f3 UPGRADING-NC.md - draft version 2025-05-26 13:08:26 +01:00
Nick Stokoe
ce11e16d36 templates/docker-compose/docker-compose.yml - drop "version" attribute
Docker compose doesn't seem to like it and complains now.
2025-05-26 12:38:59 +01:00
Nick Stokoe
9e4acdba02 templates/docker-compose/docker-compose.yml - bump nextcloud to v31
Actual upgrade done one major version at a time.
2025-05-26 12:38:14 +01:00
Nick Stokoe
5ce705580f templates/docker-compose/postgres/Dockerfile.j2 - bump to v17 2025-05-26 12:37:45 +01:00
Nick Stokoe
6282fe8022 * - use "docker compose" not "docker-compose"
Latter is obsolete now
2025-05-26 10:54:02 +01:00
Nick Stokoe
0d1c9225e5 templates/bin/ncadmin - use "docker compose" not "docker-compose"
Latter is obsolete now
2025-05-25 18:43:38 +01:00
Nick Stokoe
b26ac645bd snackpot.yml - comment out nonworking notifies 2025-05-25 18:34:38 +01:00
Nick Stokoe
8ad6e1c81c snackpot.yml,requirements.yml - update for ansible 2.18.6 2025-05-25 18:34:38 +01:00
Nick Stokoe
4a759b3ff1 templates/docker-compose/navidrome/Dockerfile - bump navidrome to v54.4 2025-05-25 18:29:56 +01:00
10 changed files with 46 additions and 25 deletions

19
UPGRADING-NC.md Normal file
View File

@@ -0,0 +1,19 @@
DRAFT!
upgrade one major version at a time
check that the version of postgresql is adequate for the target version before upgrading
if it isn't, upgrade it:
dump the data
move the volume aside
recreate the volume
upgrade
start
re-import
delete the old volume
copy over the pg_hba.conf, otherwise the auth credentials won't be used correctly (need:
host all all all md5)

View File

@@ -4,3 +4,6 @@ roles:
- name: mrlesmithjr.netplan
version: v0.3.0
collections:
- name: community.general

View File

@@ -12,7 +12,7 @@
navidrome_hostname: nd.noodlefactory.co.uk
letsencrypt_email: webmaster@noodlefactory.co.uk
docker_compose_base_dir: /opt/docker-compose
docker_compose_cmd: docker-compose
docker_compose_cmd: docker compose
borg_passphrase: "{{lookup('passwordstore', 'servers/snackpot/borg.passphrase')}}"
smtp_password: "{{lookup('passwordstore', 'servers/snackpot/smtp.password')}}"
borg_ssh_key: "{{lookup('passwordstore', 'servers/snackpot/borg.id_rsa')}}"
@@ -87,7 +87,7 @@
file:
path: "{{ docker_compose_base_dir }}/{{ item.path }}"
state: directory
with_filetree: templates/docker-compose
with_community.general.filetree: templates/docker-compose
when: item.state == "directory" and item.path.count("/.") == 0
tags: docker-config
@@ -99,8 +99,8 @@
group: root
mode: 0660
backup: yes
notify: restart docker compose services
with_filetree: templates/docker-compose
# notify: restart docker compose services
with_community.general.filetree: templates/docker-compose
when: item.state == "file" and item.path.endswith(".j2")
tags: docker-config
@@ -112,8 +112,8 @@
group: root
mode: 0660
backup: yes
notify: restart docker compose services
with_filetree: templates/docker-compose
# notify: restart docker compose services
with_community.general.filetree: templates/docker-compose
when: |-
item.state == "file" and not (
item.path.endswith("~") or item.path.endswith(".j2")
@@ -134,7 +134,7 @@
owner: root
group: root
mode: 0550
with_filetree: templates/bin
with_community.general.filetree: templates/bin
when: item.state == "file" and not item.path.endswith("~")
tags: docker-config
@@ -149,7 +149,7 @@
- appserver.service
- borg.service
- borg.timer
tags: docker-config
tags: docker-configz
- name: enable backup service
service:

View File

@@ -8,22 +8,22 @@ set -o errexit
cd "/opt/docker-compose"
set -vx
docker-compose exec -T -u www-data nextcloud ./occ maintenance:mode --on ||
docker compose exec -T -u www-data nextcloud ./occ maintenance:mode --on ||
echo "WARNING: Couldn't stop nextcloud container, proceeding anyway"
docker-compose down --remove-orphans || {
echo "ERROR: Couldn't stop docker-compose, restarting and aborting"
docker compose down --remove-orphans || {
echo "ERROR: Couldn't stop docker compose, restarting and aborting"
docker network prune --force
docker-compose up -d
docker compose up -d
exit
}
docker network prune --force # remove dangling networks
docker-compose run --name borgmatic -T --rm borgmatic /backup.sh run ||
docker compose run --name borgmatic -T --rm borgmatic /backup.sh run ||
echo "ERROR: Couldn't run borgmatic"
docker-compose up -d main-services || {
echo "ERROR: couldn't restart docker-compose services, aborting with no services!"
docker compose up -d main-services || {
echo "ERROR: couldn't restart docker compose services, aborting with no services!"
exit 1
}
docker-compose exec -T -u www-data nextcloud ./occ maintenance:mode --off ||
docker compose exec -T -u www-data nextcloud ./occ maintenance:mode --off ||
echo "Couldn't turn off nextcloud's maintainance mode"
docker-compose run --name borgmatic -T --rm borgmatic /backup.sh check ||
docker compose run --name borgmatic -T --rm borgmatic /backup.sh check ||
echo "Couldn't run the bormatic backup check"

View File

@@ -1,2 +1,2 @@
#!/bin/sh
exec docker-compose run -- borgmatic borg "$@"
exec docker compose run -- borgmatic borg "$@"

View File

@@ -1,2 +1,2 @@
#!/bin/sh
exec docker-compose run -- borgmatic borgmatic "$@"
exec docker compose run -- borgmatic borgmatic "$@"

View File

@@ -8,7 +8,7 @@ nextcloud_db_user={{ nextcloud_db_user }}
nextcloud_db={{ nextcloud_db }}
DOCKER_EXE() {
( cd $dc_dir; docker-compose exec "$@" )
( cd $dc_dir; docker compose exec "$@" )
}
ON_POSTGRES() {

View File

@@ -2,7 +2,6 @@
# Adapted from:
# https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/fpm/docker-compose.yml
version: '3'
volumes:
postgres:
@@ -56,7 +55,7 @@ services:
- redis:/data
nextcloud:
image: nextcloud:28-fpm-alpine
image: nextcloud:31-fpm-alpine
restart: always
volumes:
- nextcloud_src:/var/www/html
@@ -76,7 +75,7 @@ services:
# test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"]
nextcloud_cron:
image: nextcloud:28-fpm-alpine
image: nextcloud:31-fpm-alpine
restart: always
volumes:
- nextcloud_src:/var/www/html

View File

@@ -1,4 +1,4 @@
FROM deluan/navidrome:0.50.2
FROM deluan/navidrome:0.54.4
RUN apk add --no-cache mpv
# Ensure that navidrome has access to these directories

View File

@@ -1,2 +1,2 @@
FROM postgres:11.9-alpine
FROM postgres:17-alpine
COPY --chown={{ postgres_db_user }}:{{ postgres_db_user }} init.sql /docker-entrypoint-initdb.d/