feat(infra): optimize PostGIS/pgvector container and track environment template

- Refactor docker/postgres/Dockerfile to build on pgvector:pg17 with postgresql-17-postgis-3.
- Fix .gitignore rule to cleanly track .env.example.
- Add .env.example with local database, auth, and PGAdmin configuration templates.
This commit is contained in:
kiskaadee committed 2026-10-13 07:12:38 -05:00
1 parent ccb53d87a2
commit 6aafe3ff6f
3 files changed
+25 -14

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
# PostgreSQL Database Configuration
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=novias_db
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/novias_db
# PGAdmin Configuration
PGADMIN_EMAIL=admin@example.com
PGADMIN_PASSWORD=admin
# JWT & Authentication
JWT_SECRET=development_insecure_jwt_secret_change_me
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=1440
# SSO Google OAuth (Optional in development / MockDevAdapter active)
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=http://localhost:8000/v1/auth/callback
+2 -2
View File
@@ -7,8 +7,8 @@ __pycache__/
.mypy_cache/ .mypy_cache/
.env .env
.env.* # Keep templates tracked
!.env.example # Keep templates tracked !.env.example
*.pem *.pem
*.key *.key
client_secret*.json client_secret*.json
+4 -12
View File
@@ -1,18 +1,10 @@
FROM postgis/postgis:17-3.5 FROM pgvector/pgvector:pg17
# Install build dependencies and pgvector # Install official PostGIS 3 for PostgreSQL 17
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
postgresql-17-pgvector || \ postgresql-17-postgis-3 \
(apt-get install -y --no-install-recommends git build-essential postgresql-server-dev-17 && \ postgresql-17-postgis-3-scripts && \
cd /tmp && \
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git && \
cd pgvector && \
make && \
make install && \
apt-get remove -y git build-essential postgresql-server-dev-17 && \
apt-get autoremove -y && \
rm -rf /tmp/pgvector) && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
COPY docker/postgres/init-extensions.sql /docker-entrypoint-initdb.d/01-init-extensions.sql COPY docker/postgres/init-extensions.sql /docker-entrypoint-initdb.d/01-init-extensions.sql