use psycopg2 to "easily" enable SSL

This commit is contained in:
Jack Case
2025-10-25 19:09:08 +00:00
parent a4c783b2d9
commit e1a392a0bf
3 changed files with 4 additions and 3 deletions

3
.gitignore vendored
View File

@@ -213,4 +213,5 @@ marimo/_lsp/
__marimo__/ __marimo__/
# Streamlit # Streamlit
.streamlit/secrets.toml .streamlit/secrets.toml
slopserver/server_config.env

View File

@@ -24,7 +24,7 @@ Mako==1.3.10
markdown-it-py==4.0.0 markdown-it-py==4.0.0
MarkupSafe==3.0.3 MarkupSafe==3.0.3
mdurl==0.1.2 mdurl==0.1.2
psycopg==3.2.10 psycopg2==2.9.11
pwdlib==0.2.1 pwdlib==0.2.1
pycparser==2.23 pycparser==2.23
pydantic==2.12.3 pydantic==2.12.3

View File

@@ -40,7 +40,7 @@ app = FastAPI()
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
class ServerSettings(BaseSettings): class ServerSettings(BaseSettings):
db_url: str = "postgresql+psycopg://slop-farmer@192.168.1.163/slop-farmer" db_url: str = "postgresql+psycopg2://slop-farmer@192.168.1.163/slop-farmer"
token_secret: str = "5bcc778a96b090c3ac1d587bb694a060eaf7bdb5832365f91d5078faf1fff210" token_secret: str = "5bcc778a96b090c3ac1d587bb694a060eaf7bdb5832365f91d5078faf1fff210"
# altcha_secret: str # altcha_secret: str