Compare commits
9 Commits
da90c4713c
...
155abad7f3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
155abad7f3 | ||
|
|
ce11e16d36 | ||
|
|
9e4acdba02 | ||
|
|
5ce705580f | ||
|
|
6282fe8022 | ||
|
|
0d1c9225e5 | ||
|
|
b26ac645bd | ||
|
|
8ad6e1c81c | ||
|
|
4a759b3ff1 |
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)
|
||||||
@@ -4,3 +4,6 @@ roles:
|
|||||||
- name: mrlesmithjr.netplan
|
- name: mrlesmithjr.netplan
|
||||||
version: v0.3.0
|
version: v0.3.0
|
||||||
|
|
||||||
|
collections:
|
||||||
|
- name: community.general
|
||||||
|
|
||||||
|
|||||||
16
snackpot.yml
16
snackpot.yml
@@ -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')}}"
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ docker_compose_base_dir }}/{{ item.path }}"
|
path: "{{ docker_compose_base_dir }}/{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
with_filetree: templates/docker-compose
|
with_community.general.filetree: templates/docker-compose
|
||||||
when: item.state == "directory" and item.path.count("/.") == 0
|
when: item.state == "directory" and item.path.count("/.") == 0
|
||||||
tags: docker-config
|
tags: docker-config
|
||||||
|
|
||||||
@@ -99,8 +99,8 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0660
|
mode: 0660
|
||||||
backup: yes
|
backup: yes
|
||||||
notify: restart docker compose services
|
# notify: restart docker compose services
|
||||||
with_filetree: templates/docker-compose
|
with_community.general.filetree: templates/docker-compose
|
||||||
when: item.state == "file" and item.path.endswith(".j2")
|
when: item.state == "file" and item.path.endswith(".j2")
|
||||||
tags: docker-config
|
tags: docker-config
|
||||||
|
|
||||||
@@ -112,8 +112,8 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0660
|
mode: 0660
|
||||||
backup: yes
|
backup: yes
|
||||||
notify: restart docker compose services
|
# notify: restart docker compose services
|
||||||
with_filetree: templates/docker-compose
|
with_community.general.filetree: templates/docker-compose
|
||||||
when: |-
|
when: |-
|
||||||
item.state == "file" and not (
|
item.state == "file" and not (
|
||||||
item.path.endswith("~") or item.path.endswith(".j2")
|
item.path.endswith("~") or item.path.endswith(".j2")
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0550
|
mode: 0550
|
||||||
with_filetree: templates/bin
|
with_community.general.filetree: templates/bin
|
||||||
when: item.state == "file" and not item.path.endswith("~")
|
when: item.state == "file" and not item.path.endswith("~")
|
||||||
tags: docker-config
|
tags: docker-config
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
- appserver.service
|
- appserver.service
|
||||||
- borg.service
|
- borg.service
|
||||||
- borg.timer
|
- borg.timer
|
||||||
tags: docker-config
|
tags: docker-configz
|
||||||
|
|
||||||
- name: enable backup service
|
- name: enable backup service
|
||||||
service:
|
service:
|
||||||
|
|||||||
@@ -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,4 +1,4 @@
|
|||||||
FROM deluan/navidrome:0.50.2
|
FROM deluan/navidrome:0.54.4
|
||||||
|
|
||||||
RUN apk add --no-cache mpv
|
RUN apk add --no-cache mpv
|
||||||
# Ensure that navidrome has access to these directories
|
# Ensure that navidrome has access to these directories
|
||||||
|
|||||||
@@ -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