From ff95570da6fed38040b9517014ebea62b794c308 Mon Sep 17 00:00:00 2001 From: Anas Khafaga Date: Sun, 29 Sep 2024 14:39:16 +0300 Subject: [PATCH] feat(Docker): Configure debugging with vscode and chrome --- .vscode/launch.json | 16 ++++++++++++++++ .vscode/tasks.json | 21 +++++++++++++++++++++ docker-compose.yaml | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..fc4b8128f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Docker Debug Frontend", + "request": "launch", + "type": "chrome", + "preLaunchTask": "docker-compose: debug:frontend", + "url": "http://127.0.0.1:5173", + "webRoot": "${workspaceFolder}/frontend", + "skipFiles": [ + "/**" + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..ea0974bd4 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,21 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "docker-compose", + "label": "docker-compose: debug:frontend", + "dockerCompose": { + "up": { + "detached": true, + "services": [ + "frontend" + ], + "build": true + }, + "files": [ + "${workspaceFolder}/docker-compose.yaml" + ] + } + } + ] +} \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 5b4d48baf..f3b8a3633 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,6 +1,8 @@ services: frontend: build: ./frontend + volumes: + - ./frontend/src:/app/src environment: - VITE_API_HOST=http://localhost:7091 - VITE_API_STREAMING=$VITE_API_STREAMING