diff --git a/.gitignore b/.gitignore index 575d077a6c..46e6cb9dd2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store -.vscode +.vscode/* +!.vscode/launch.json .idea -docker/upload \ No newline at end of file +docker/upload diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..086f3c694c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "attach", + "restart": true, + "port": 9230, + "name": "Immich Server", + "remoteRoot": "/usr/src/app", + "localRoot": "${workspaceFolder}/server" + } + ] +} diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 9e68e8e4d6..04ef4dbb1e 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -1,4 +1,4 @@ -version: "3.8" +version: '3.8' services: immich-server: @@ -7,11 +7,13 @@ services: context: ../server dockerfile: Dockerfile target: builder - command: npm run start:dev immich + command: npm run start:debug immich volumes: - ../server:/usr/src/app - ${UPLOAD_LOCATION}:/usr/src/app/upload - /usr/src/app/node_modules + ports: + - 9230:9230 env_file: - .env environment: diff --git a/server/package.json b/server/package.json index 7d7f5ea2b2..3bf104da69 100644 --- a/server/package.json +++ b/server/package.json @@ -11,7 +11,7 @@ "format": "prettier --write \"apps/**/*.ts\" \"libs/**/*.ts\"", "start": "nest start", "start:dev": "nest start --watch", - "start:debug": "nest start --debug --watch", + "start:debug": "nest start --debug 0.0.0.0:9230 --watch", "start:prod": "node dist/main", "lint": "eslint \"{apps,libs}/**/*.ts\" --max-warnings 0", "lint:fix": "npm run lint -- --fix",