Compare commits
5 Commits
155abad7f3
...
f35dd620aa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f35dd620aa | ||
|
|
66b472dab2 | ||
|
|
7061ef37f8 | ||
|
|
5c12a6f053 | ||
|
|
7c4f1091b4 |
19
UPGRADING-NC.md
Normal file
19
UPGRADING-NC.md
Normal 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)
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
navidrome_hostname: nd.noodlefactory.co.uk
|
navidrome_hostname: nd.noodlefactory.co.uk
|
||||||
letsencrypt_email: webmaster@noodlefactory.co.uk
|
letsencrypt_email: webmaster@noodlefactory.co.uk
|
||||||
docker_compose_base_dir: /opt/docker-compose
|
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')}}"
|
borg_passphrase: "{{lookup('passwordstore', 'servers/snackpot/borg.passphrase')}}"
|
||||||
smtp_password: "{{lookup('passwordstore', 'servers/snackpot/smtp.password')}}"
|
smtp_password: "{{lookup('passwordstore', 'servers/snackpot/smtp.password')}}"
|
||||||
borg_ssh_key: "{{lookup('passwordstore', 'servers/snackpot/borg.id_rsa')}}"
|
borg_ssh_key: "{{lookup('passwordstore', 'servers/snackpot/borg.id_rsa')}}"
|
||||||
|
|||||||
@@ -8,22 +8,22 @@ set -o errexit
|
|||||||
cd "/opt/docker-compose"
|
cd "/opt/docker-compose"
|
||||||
|
|
||||||
set -vx
|
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"
|
echo "WARNING: Couldn't stop nextcloud container, proceeding anyway"
|
||||||
docker-compose down --remove-orphans || {
|
docker compose down --remove-orphans || {
|
||||||
echo "ERROR: Couldn't stop docker-compose, restarting and aborting"
|
echo "ERROR: Couldn't stop docker compose, restarting and aborting"
|
||||||
docker network prune --force
|
docker network prune --force
|
||||||
docker-compose up -d
|
docker compose up -d
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
docker network prune --force # remove dangling networks
|
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"
|
echo "ERROR: Couldn't run borgmatic"
|
||||||
docker-compose up -d main-services || {
|
docker compose up -d main-services || {
|
||||||
echo "ERROR: couldn't restart docker-compose services, aborting with no services!"
|
echo "ERROR: couldn't restart docker compose services, aborting with no services!"
|
||||||
exit 1
|
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"
|
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"
|
echo "Couldn't run the bormatic backup check"
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec docker-compose run -- borgmatic borg "$@"
|
exec docker compose run -- borgmatic borg "$@"
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec docker-compose run -- borgmatic borgmatic "$@"
|
exec docker compose run -- borgmatic borgmatic "$@"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ nextcloud_db_user={{ nextcloud_db_user }}
|
|||||||
nextcloud_db={{ nextcloud_db }}
|
nextcloud_db={{ nextcloud_db }}
|
||||||
|
|
||||||
DOCKER_EXE() {
|
DOCKER_EXE() {
|
||||||
( cd $dc_dir; docker-compose exec "$@" )
|
( cd $dc_dir; docker compose exec "$@" )
|
||||||
}
|
}
|
||||||
|
|
||||||
ON_POSTGRES() {
|
ON_POSTGRES() {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
# Adapted from:
|
# Adapted from:
|
||||||
# https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/fpm/docker-compose.yml
|
# https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/fpm/docker-compose.yml
|
||||||
|
|
||||||
version: '3'
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres:
|
postgres:
|
||||||
@@ -56,7 +55,7 @@ services:
|
|||||||
- redis:/data
|
- redis:/data
|
||||||
|
|
||||||
nextcloud:
|
nextcloud:
|
||||||
image: nextcloud:28-fpm-alpine
|
image: nextcloud:31-fpm-alpine
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- nextcloud_src:/var/www/html
|
- nextcloud_src:/var/www/html
|
||||||
@@ -76,7 +75,7 @@ services:
|
|||||||
# test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"]
|
# test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"]
|
||||||
|
|
||||||
nextcloud_cron:
|
nextcloud_cron:
|
||||||
image: nextcloud:28-fpm-alpine
|
image: nextcloud:31-fpm-alpine
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- nextcloud_src:/var/www/html
|
- nextcloud_src:/var/www/html
|
||||||
|
|||||||
@@ -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/
|
COPY --chown={{ postgres_db_user }}:{{ postgres_db_user }} init.sql /docker-entrypoint-initdb.d/
|
||||||
|
|||||||
Reference in New Issue
Block a user