Skip to content

Commit 4ac1454

Browse files
committed
out-of-box for debug at local
1 parent 6c9b1fa commit 4ac1454

File tree

2 files changed

+45
-8
lines changed

2 files changed

+45
-8
lines changed

.vscode/launch.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,31 @@
55
"version": "0.2.0",
66
"configurations": [
77
{
8-
"name": "Debug FastAPI Project backend: Python Debugger",
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Debug frontend - React: npm run dev",
11+
"runtimeExecutable": "npm",
12+
"runtimeArgs": ["run", "dev"],
13+
"console": "integratedTerminal",
14+
"cwd": "${workspaceFolder}/frontend",
15+
"envFile": "${workspaceFolder}/.env"
16+
},
17+
{
18+
"name": "Debug backend - Fastapi: debugpy",
919
"type": "debugpy",
1020
"request": "launch",
1121
"module": "uvicorn",
12-
"args": [
13-
"app.main:app",
14-
"--reload"
15-
],
22+
"args": ["app.main:app", "--reload"],
1623
"cwd": "${workspaceFolder}/backend",
1724
"jinja": true,
18-
"envFile": "${workspaceFolder}/.env",
25+
"envFile": "${workspaceFolder}/.env"
1926
},
2027
{
2128
"type": "chrome",
2229
"request": "launch",
23-
"name": "Debug Frontend: Launch Chrome against http://localhost:5173",
30+
"name": "Debug Frontend: Launch Chrome http://localhost:5173",
2431
"url": "http://localhost:5173",
2532
"webRoot": "${workspaceFolder}/frontend"
26-
},
33+
}
2734
]
2835
}

docker-compose-db.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
services:
2+
3+
db:
4+
image: postgres:17
5+
restart: always
6+
healthcheck:
7+
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
8+
interval: 10s
9+
retries: 5
10+
start_period: 30s
11+
timeout: 10s
12+
ports:
13+
- "127.0.0.1:5432:5432"
14+
volumes:
15+
- app-db-data:/var/lib/postgresql/data/pgdata
16+
env_file:
17+
- .env
18+
environment:
19+
- PGDATA=/var/lib/postgresql/data/pgdata
20+
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
21+
- POSTGRES_USER=${POSTGRES_USER?Variable not set}
22+
- POSTGRES_DB=${POSTGRES_DB?Variable not set}
23+
24+
volumes:
25+
app-db-data:
26+
27+
# networks:
28+
# traefik-public:
29+
# # Allow setting it to false for testing
30+
# external: true

0 commit comments

Comments
 (0)