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:
1 parent
ccb53d87a2
commit
6aafe3ff6f
3 files changed
+25
-14
No files matched your search
@@ -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
@@ -7,8 +7,8 @@ __pycache__/
|
||||
.mypy_cache/
|
||||
|
||||
.env
|
||||
.env.*
|
||||
!.env.example # Keep templates tracked
|
||||
# Keep templates tracked
|
||||
!.env.example
|
||||
*.pem
|
||||
*.key
|
||||
client_secret*.json
|
||||
|
||||
@@ -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 && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
postgresql-17-pgvector || \
|
||||
(apt-get install -y --no-install-recommends git build-essential postgresql-server-dev-17 && \
|
||||
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) && \
|
||||
postgresql-17-postgis-3 \
|
||||
postgresql-17-postgis-3-scripts && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY docker/postgres/init-extensions.sql /docker-entrypoint-initdb.d/01-init-extensions.sql
|
||||
Reference in new issue
Block a user