mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 23:38:13 +02:00
Solved ooauth2 bugs and restructured postgres roile to implement extensions used by discourse
This commit is contained in:
22
roles/svc-db-postgres/templates/Dockerfile.j2
Normal file
22
roles/svc-db-postgres/templates/Dockerfile.j2
Normal 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
|
22
roles/svc-db-postgres/templates/docker-compose.yml.j2
Normal file
22
roles/svc-db-postgres/templates/docker-compose.yml.j2
Normal 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' %}
|
3
roles/svc-db-postgres/templates/env.j2
Normal file
3
roles/svc-db-postgres/templates/env.j2
Normal file
@@ -0,0 +1,3 @@
|
||||
POSTGRES_PASSWORD="{{ postgres_password }}"
|
||||
# Necessary for web-app-matrix
|
||||
POSTGRES_INITDB_ARGS="--encoding=UTF8 --locale=C"
|
Reference in New Issue
Block a user