diff --git a/ansible/roles/postgres/tasks/main.yml b/ansible/roles/postgres/tasks/main.yml index d17eae0a2..0c47c2c19 100644 --- a/ansible/roles/postgres/tasks/main.yml +++ b/ansible/roles/postgres/tasks/main.yml @@ -7,29 +7,20 @@ notify: reload postgres register: updated_config -- name: Ensure postgres archive directory +- name: Create Postgres docker volumes with correct permissions become: yes file: - path: /srv/newsblur/docker/volumes/postgres/archive + path: "{{ item }}" state: directory - mode: 0755 - -- name: Ensure postgres backup directory - become: yes - file: - path: /srv/newsblur/docker/volumes/postgres/backups - state: directory - mode: 0755 - -- name: Ensure postgres data directory - become: yes - file: - path: /srv/newsblur/docker/volumes/postgres/data - state: directory - mode: 0755 + recurse: yes + owner: "{{ ansible_effective_user_id|int }}" + group: "{{ ansible_effective_group_id|int }}" + with_items: + - /srv/newsblur/docker/volumes/postgres/archive + - /srv/newsblur/docker/volumes/postgres/backup + - /srv/newsblur/docker/volumes/postgres/data - name: Start postgres docker containers - become: yes docker_container: name: postgres image: postgres:13 @@ -48,6 +39,7 @@ - postgres ports: - 5432:5432 + user: 1000:1001 volumes: - /srv/newsblur/docker/volumes/postgres/data:/var/lib/postgresql/data - /srv/newsblur/docker/volumes/postgres/archive:/var/lib/postgresql/archive diff --git a/ansible/roles/postgres/templates/consul_service.json b/ansible/roles/postgres/templates/consul_service.json index 7e10c08f0..caa43016f 100644 --- a/ansible/roles/postgres/templates/consul_service.json +++ b/ansible/roles/postgres/templates/consul_service.json @@ -1,6 +1,6 @@ { "service": { - "name": "db-postgres-secondary", + "name": "db-postgres", "tags": [ "db" ], diff --git a/templates/maintenance_off.html b/templates/maintenance_off.html index 0235bd24c..5d0ad3d01 100644 --- a/templates/maintenance_off.html +++ b/templates/maintenance_off.html @@ -85,7 +85,7 @@

NewsBlur is in maintenance mode

-

This is a database migration in prep for the NewsBlur Premium Archive subscription. Technically I don't need to bring down the site to do this, but I just wanted to be 100% sure. This should last less than 10-15 seconds, although it always takes me an extra 30 seconds to remember to take the maintenance page down.

+

Moving to a larger Postgresql DB. This is the second of three major DB upgrades, the first being 12 hours ago. When these three upgrades are complete (within the next few days), NewsBlur will be much, much faster (editors note: it already is after last night's upgrade). All in prep for the upcoming Premium Archive feature. That and the redesign are available to beta test right now at beta.newsblur.com. Better go quick before this message auto-refreshes back to a working NewsBlur.

To pass the time, check out what's popular on MLTSHP.