tablespaces, structure.sql

This commit is contained in:
Dylan Knutson
2025-01-27 18:12:18 +00:00
parent 1cbc94b43c
commit 9746cefa51
5 changed files with 1000 additions and 246 deletions

View File

@@ -74,7 +74,7 @@ RUN git config --system core.pager "delta" && \
git config --system delta.navigate true && \
git config --system delta.dark true && \
git config --system delta.side-by-side true && \
git config --system merge.conflictstyle "zdiff3" \
git config --system merge.conflictstyle "zdiff3" && \
git config --system core.editor "cursor --wait"
# Install native gems

View File

@@ -4,4 +4,5 @@ RUN apt-get update && apt-get install -y \
postgresql-17-pgvector \
&& rm -rf /var/lib/apt/lists/*
COPY create-tablespaces.bash /docker-entrypoint-initdb.d/00-create-tablespaces.bash
RUN echo "CREATE EXTENSION pgvector;" >> /docker-entrypoint-initdb.d/01-pgvector.sql

View File

@@ -0,0 +1,9 @@
#!/bin/bash -ex
mkdir -p /tablespaces/mirai
chown postgres:postgres /tablespaces/mirai
chmod 750 /tablespaces/mirai
psql -v ON_ERROR_STOP=1 \
--username "$POSTGRES_USER" \
--dbname "$POSTGRES_DB" \
-c "CREATE TABLESPACE mirai LOCATION '/tablespaces/mirai'"

View File

@@ -24,6 +24,7 @@ services:
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
- postgres-data-tablespaces:/tablespaces
- ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql
environment:
POSTGRES_USER: postgres
@@ -66,6 +67,7 @@ services:
volumes:
postgres-data:
postgres-data-tablespaces:
devcontainer-redux-gem-cache:
devcontainer-redux-blob-files:
devcontainer-redux-grafana-data: