-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: automatically backup and migrate upon version upgrade of outline
- Loading branch information
1 parent
3728d8e
commit 56956bf
Showing
5 changed files
with
91 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
|
||
# Mark migration as started | ||
# Ensures migration critical processes will be continued upon abortion | ||
- name: "Create migration marker" | ||
become_user: "outline" | ||
become: true | ||
ansible.builtin.file: | ||
path: "{{ outline_config.project_source }}/.MIGRATION_PENDING" | ||
state: "touch" | ||
owner: "outline" | ||
group: "outline" | ||
listen: "trigger outline migration" | ||
|
||
|
||
- name: "Ensure outline is offline" | ||
community.docker.docker_compose_v2: | ||
project_src: "{{ outline_config.project_source }}" | ||
state: "absent" | ||
listen: "backup outline" | ||
# TODO create a maintenance mode? | ||
|
||
- name: "Make backup of outline database" | ||
become_user: "root" | ||
become: true | ||
ansible.builtin.systemd: | ||
name: "backup-postgres.service" | ||
state: "started" | ||
listen: "backup outline" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
--- | ||
outline_project_source: "/var/www/outline/outline" | ||
|
||
outline_config: | ||
project_source: "/var/www/outline/outline" | ||
version: "0.78.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters