Solved ooauth2 bugs and restructured postgres roile to implement extensions used by discourse

This commit is contained in:
2025-07-23 13:24:55 +02:00
parent d1fcbedef6
commit 0472fecd64
22 changed files with 187 additions and 78 deletions

View File

@@ -0,0 +1,22 @@
FROM {{ postgres_image }}:{{ postgres_version }}
{% if postgres_pg_vector_enabled %}
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
git \
postgresql-server-dev-all \
&& git clone https://github.com/pgvector/pgvector.git /tmp/pgvector \
&& cd /tmp/pgvector \
&& make \
&& make install \
&& rm -rf /tmp/pgvector \
&& apt-get purge -y --auto-remove git build-essential \
&& rm -rf /var/lib/apt/lists/*
{% endif %}
HEALTHCHECK --interval=10s \
--timeout=5s \
--start-period=15m \
--retries=5 \
CMD pg_isready -U postgres || exit 1

View File

@@ -0,0 +1,22 @@
{% include 'roles/docker-compose/templates/base.yml.j2' %}
postgres:
container_name: "{{ postgres_name }}"
image: "{{ postgres_custom_image_name }}"
build:
context: .
dockerfile: Dockerfile
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% if postgres_expose_local %}
ports:
- "{{ postgres_local_host }}:{{ postgres_port }}:5432"
{% endif %}
volumes:
- "data:/var/lib/postgresql/data"
{% include 'roles/docker-container/templates/networks.yml.j2' %}
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
data:
name: "{{ postgres_volume }}"
{% include 'roles/docker-compose/templates/networks.yml.j2' %}

View File

@@ -0,0 +1,3 @@
POSTGRES_PASSWORD="{{ postgres_password }}"
# Necessary for web-app-matrix
POSTGRES_INITDB_ARGS="--encoding=UTF8 --locale=C"