--- # tasks file for discourse # # Discourse runs from an image built with the official launcher; the Bitnami # chart stops at 3.5.0. To upgrade, change params.version in # files/discourse/web_only.yml, then from a discourse_docker checkout: # cp /files/discourse/web_only.yml containers/web_only.yml # launcher build --set base_image=-web-only \ # --tag gitea.eom.dev/devops/discourse-web: web_only --output=type=docker # Push it, update the image tag in files/discourse/discourse-web.yaml, and re-run. # # Pushing through the gitea ingress needs proxy-body-size raised and # proxy-request-buffering "off" for the push, then restored. With buffering on, # ingress-nginx writes layers to its node's small disk; on 2026-11-08 that caused # DiskPressure, evicted the MetalLB speaker, and took the public sites down. # # Redis, the secrets, the uploads PVC, the Service and the Ingress still come from # the original Helm release, which must stay installed but is no longer upgraded. - name: Deploy PostgreSQL 18 for Discourse kubernetes.core.k8s: state: present src: "{{ role_path }}/files/discourse/postgres18.yaml" - name: Deploy Discourse kubernetes.core.k8s: state: present src: "{{ role_path }}/files/discourse/discourse-web.yaml" wait: true wait_condition: type: Available status: "True" wait_timeout: 1800 - name: Point the Discourse Service at the launcher-built pods kubernetes.core.k8s: state: present merge_type: merge definition: apiVersion: v1 kind: Service metadata: name: discourse namespace: discourse spec: selector: app.kubernetes.io/name: discourse-web app.kubernetes.io/instance: null - name: Find the Discourse pod kubernetes.core.k8s_info: kind: Pod namespace: discourse label_selectors: - app.kubernetes.io/name=discourse-web field_selectors: - status.phase=Running register: discourse_pods - name: Copy the Dex sign-in / membership sign-up settings script kubernetes.core.k8s_cp: namespace: discourse pod: "{{ discourse_pods.resources[0].metadata.name }}" container: discourse local_path: "{{ role_path }}/files/discourse-sso.rb" remote_path: /tmp/discourse-sso.rb - name: Apply Dex sign-in / membership sign-up settings kubernetes.core.k8s_exec: namespace: discourse pod: "{{ discourse_pods.resources[0].metadata.name }}" container: discourse command: >- bash -c 'cd /var/www/discourse && su discourse -c "RAILS_ENV=production bundle exec rails runner /tmp/discourse-sso.rb"' register: discourse_sso changed_when: false