mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-29 14:30:52 +00:00
Merge pull request #783 from kevinveenbirkenbach/fix/web-app-mobilizon/postgres-18-migrations/779
fix(web-app-mobilizon): patch four migrations for PostgreSQL 18
This commit is contained in:
5 files changed
+28
No files matched your search
@@ -0,0 +1,3 @@
|
||||
# TODO
|
||||
|
||||
- Drop the custom image build once the pinned Mobilizon release ships the PostgreSQL 18 migration fix (upstream merge request 1683, milestone 5.3.0). The build of `files/Dockerfile` fails on that release and names the migration that no longer needs the patch. Then delete `files/Dockerfile`, the `build` block in `templates/compose.yml.j2`, `MOBILIZON_IMAGE` and `MOBILIZON_VERSION` in `vars/main.yml`, and `custom: true` in `meta/services.yml`.
|
||||
@@ -0,0 +1,18 @@
|
||||
ARG MOBILIZON_IMAGE
|
||||
ARG MOBILIZON_VERSION
|
||||
FROM ${MOBILIZON_IMAGE}:${MOBILIZON_VERSION}
|
||||
|
||||
RUN set -eu; \
|
||||
cd /lib/mobilizon-*/priv/repo/migrations; \
|
||||
for migration in \
|
||||
20190806131306_add_url_to_follows_and_move_to_uuid.exs \
|
||||
20190813160207_add_url_and_uuid_to_participants.exs \
|
||||
20200218170232_move_member_id_to_uuid.exs \
|
||||
20200721131521_add_url_to_conversation.exs; \
|
||||
do \
|
||||
if ! grep -q 'add(:id, :uuid, primary_key: true)$' "${migration}"; then \
|
||||
echo "${migration} no longer contains 'add(:id, :uuid, primary_key: true)': the base image ships the PostgreSQL 18 migration fix (framagit.org/kaihuri/mobilizon merge request 1683). Drop this Dockerfile and the custom build of web-app-mobilizon." >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
sed -i 's/add(:id, :uuid, primary_key: true)$/add(:id, :uuid, primary_key: true, null: false)/' "${migration}"; \
|
||||
done
|
||||
@@ -40,6 +40,7 @@ mobilizon:
|
||||
image: docker.io/kaihuri/mobilizon
|
||||
name: mobilizon
|
||||
version: 5.2.4
|
||||
custom: true
|
||||
min_storage: 825MB
|
||||
titel: Mobilizon on {{ DOMAIN_PRIMARY | upper }}
|
||||
ports:
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{% include 'roles/sys-svc-compose/templates/base.yml.j2' %}
|
||||
{% set service_name = 'mobilizon' %}
|
||||
{{ service_name }}:
|
||||
{{ lookup('template', 'roles/sys-svc-container/templates/build.yml.j2') | indent(4) }}
|
||||
args:
|
||||
MOBILIZON_IMAGE: "{{ MOBILIZON_IMAGE }}"
|
||||
MOBILIZON_VERSION: "{{ MOBILIZON_VERSION }}"
|
||||
{{ lookup('container_image', application_id, 'mobilizon') }}
|
||||
{{ lookup('compose_only', 'container_name', mobilizon_container) }}
|
||||
{{ lookup('container_volumes', service_name) | indent(4) }}
|
||||
|
||||
@@ -4,4 +4,6 @@ container_port: "{{ lookup('config', application_id, 'services.mobilizon.ports.i
|
||||
|
||||
mobilizon_host_conf_exs_file: "{{ [ lookup('container', application_id, 'directories.config'), 'config.exs' ] | path_join }}"
|
||||
mobilizon_container: "{{ lookup('config', application_id, 'services.mobilizon.name') }}"
|
||||
MOBILIZON_IMAGE: "{{ lookup('config', application_id, 'services.mobilizon.image') }}"
|
||||
MOBILIZON_VERSION: "{{ lookup('config', application_id, 'services.mobilizon.version') }}"
|
||||
MOBILIZON_OIDC_ENABLED: "{{ lookup('config', application_id, 'services.sso.enabled') }}"
|
||||
Reference in new issue
Block a user