diff --git a/.vscode/launch.json b/.vscode/launch.json index 0dbddc5e0..ab8189735 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,6 +10,38 @@ ], "port": 9229, "outputCapture": "std" + }, + { + "type": "node", + "request": "attach", + "name": "Docker: Attach to base debugger", + "address": "0.0.0.0", + "remoteRoot": "/app", + "port": 9229 + }, + { + "type": "node", + "request": "attach", + "name": "Docker: Attach to nextjs router server", + "address": "0.0.0.0", + "remoteRoot": "/app", + "port": 9230 + }, + { + "type": "node", + "request": "attach", + "name": "Docker: Attach to nextjs pages server", + "address": "0.0.0.0", + "remoteRoot": "/app", + "port": 9231 + }, + { + "type": "node", + "request": "attach", + "name": "Docker: Attach to nextjs app server", + "address": "0.0.0.0", + "remoteRoot": "/app", + "port": 9232 } ] } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 2e7db0852..d294612bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,14 @@ WORKDIR /app EXPOSE 3000 +EXPOSE 9229 + +EXPOSE 9230 + +EXPOSE 9231 + +EXPOSE 9232 + COPY package.json package-lock.json ./ RUN npm ci --legacy-peer-deps --loglevel verbose -CMD ["sh","-c","npm install --loglevel verbose --legacy-peer-deps && npx prisma migrate dev && npm run dev"] \ No newline at end of file +CMD ["sh","-c","npm install --loglevel verbose --legacy-peer-deps && npx prisma migrate dev && npm run dev"] diff --git a/docker-compose.yml b/docker-compose.yml index b3f3a9b56..6f6dacf1d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,6 +59,10 @@ services: - "3000" ports: - "3000:3000" + - "9229:9229" + - "9230:9230" + - "9231:9231" + - "9232:9232" volumes: - ./:/app labels: diff --git a/package.json b/package.json index 6fb481e57..7f945b4b9 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "NODE_OPTIONS='--trace-warnings' next dev", + "dev": "NODE_OPTIONS='--trace-warnings --inspect=0.0.0.0:9229' next dev", "build": "next build", "migrate": "prisma migrate deploy", "start": "NODE_OPTIONS='--trace-warnings --max-old-space-size=4096 --max-semi-space-size=128' next start -p $PORT --keepAliveTimeout 120000",