Skip to content

Commit 59824f3

Browse files
committed
Pg setup
1 parent 3496790 commit 59824f3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.devcontainer/docker-compose.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ services:
2424
- postgres-data:/var/lib/postgresql/data
2525
environment:
2626
POSTGRES_DB: postgres
27-
POSTGRES_USER: admin
28-
POSTGRES_PASSWORD: LocalPasswordOnly
27+
POSTGRES_USER: postgres
28+
POSTGRES_PASSWORD: postgres
2929

3030
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
3131
# (Adding the "ports" property to this file will not forward from a Codespace.)
3232

3333
volumes:
34-
postgres-data:
34+
postgres-data:

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"driver": "PostgreSQL",
88
"name": "local",
99
"database": "postgres",
10-
"username": "admin",
11-
"password": "LocalPasswordOnly"
10+
"username": "postgres",
11+
"password": "postgres"
1212
},
1313
{
1414
"name": "Azure database",

src/fastapi_app/postgres_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def create_postgres_engine(*, host, username, database, password, sslmode,
1515
token = await azure_credential.get_token("https://ossrdbms-aad.database.windows.net/.default")
1616
password = token.token
1717
else:
18-
logger.info("Authenticating to PostgreSQL using password...%s", password)
18+
logger.info("Authenticating to PostgreSQL using password...")
1919

2020
DATABASE_URI = f"postgresql+asyncpg://{username}:{password}@{host}/{database}"
2121
# Specify SSL mode if needed

0 commit comments

Comments
 (0)