Compare commits
No commits in common. "nodejs-debugging-in-docker" and "master" have entirely different histories.
nodejs-deb
...
master
@ -1,23 +0,0 @@
|
|||||||
**/.classpath
|
|
||||||
**/.dockerignore
|
|
||||||
**/.env
|
|
||||||
**/.git
|
|
||||||
**/.gitignore
|
|
||||||
**/.project
|
|
||||||
**/.settings
|
|
||||||
**/.toolstarget
|
|
||||||
**/.vs
|
|
||||||
**/.vscode
|
|
||||||
**/*.*proj.user
|
|
||||||
**/*.dbmdl
|
|
||||||
**/*.jfm
|
|
||||||
**/azds.yaml
|
|
||||||
**/charts
|
|
||||||
**/docker-compose*
|
|
||||||
**/Dockerfile*
|
|
||||||
**/node_modules
|
|
||||||
**/npm-debug.log
|
|
||||||
**/obj
|
|
||||||
**/secrets.dev.yaml
|
|
||||||
**/values.dev.yaml
|
|
||||||
README.md
|
|
49
.vscode/launch.json
vendored
49
.vscode/launch.json
vendored
@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"console": "integratedTerminal",
|
|
||||||
"internalConsoleOptions": "neverOpen",
|
|
||||||
"name": "nodemon",
|
|
||||||
"program": "${workspaceFolder}/app.js",
|
|
||||||
"request": "launch",
|
|
||||||
"restart": true,
|
|
||||||
"runtimeExecutable": "nodemon",
|
|
||||||
"skipFiles": [
|
|
||||||
"<node_internals>/**"
|
|
||||||
],
|
|
||||||
"type": "pwa-node"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"address": "TCP/IP address of process to be debugged",
|
|
||||||
"localRoot": "${workspaceFolder}",
|
|
||||||
"name": "Attach to Remote",
|
|
||||||
"port": 9229,
|
|
||||||
"remoteRoot": "Absolute path to the remote directory containing the program",
|
|
||||||
"request": "attach",
|
|
||||||
"skipFiles": [
|
|
||||||
"<node_internals>/**"
|
|
||||||
],
|
|
||||||
"type": "pwa-node"
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "Docker: Attach to Node.js",
|
|
||||||
"type": "node",
|
|
||||||
"request": "attach",
|
|
||||||
"remoteRoot": "/work/src/",
|
|
||||||
"port": 9229,
|
|
||||||
"address": "localhost",
|
|
||||||
"localRoot": "${workspaceFolder}/nodejs/src",
|
|
||||||
"protocol": "inspector",
|
|
||||||
"restart": true,
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
46
.vscode/tasks.json
vendored
46
.vscode/tasks.json
vendored
@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"type": "docker-build",
|
|
||||||
"label": "docker-build",
|
|
||||||
"platform": "node",
|
|
||||||
"dockerBuild": {
|
|
||||||
"dockerfile": "${workspaceFolder}/nodejs/src/Dockerfile",
|
|
||||||
"context": "${workspaceFolder}/nodejs/src",
|
|
||||||
"pull": true
|
|
||||||
},
|
|
||||||
"node": {
|
|
||||||
"package": "${workspaceFolder}/nodejs/src/package.json"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "docker-run",
|
|
||||||
"label": "docker-run: release",
|
|
||||||
"dependsOn": [
|
|
||||||
"docker-build"
|
|
||||||
],
|
|
||||||
"platform": "node",
|
|
||||||
"node": {
|
|
||||||
"package": "${workspaceFolder}/nodejs/src/package.json"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "docker-run",
|
|
||||||
"label": "docker-run: debug",
|
|
||||||
"dependsOn": [
|
|
||||||
"docker-build"
|
|
||||||
],
|
|
||||||
"dockerRun": {
|
|
||||||
"env": {
|
|
||||||
"DEBUG": "*",
|
|
||||||
"NODE_ENV": "development"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node": {
|
|
||||||
"package": "${workspaceFolder}/nodejs/src/package.json",
|
|
||||||
"enableDebugging": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -39,10 +39,9 @@ services:
|
|||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
volumes:
|
volumes:
|
||||||
- ./nodejs/src/:/work/src/
|
- ./nodejs/src/:/work
|
||||||
ports:
|
ports:
|
||||||
- 5502:5000
|
- 5502:5000
|
||||||
- 9229:9229 # debug port
|
|
||||||
python: #docker run -it -v ${PWD}:/work -w /work -p 5003:5000 aimvector/python:1.0.0 /bin/sh
|
python: #docker run -it -v ${PWD}:/work -w /work -p 5003:5000 aimvector/python:1.0.0 /bin/sh
|
||||||
container_name: python
|
container_name: python
|
||||||
image: cruxlight/python_dev:1.0.0
|
image: cruxlight/python_dev:1.0.0
|
||||||
|
@ -27,7 +27,7 @@ services:
|
|||||||
context: ./nodejs
|
context: ./nodejs
|
||||||
target: prod
|
target: prod
|
||||||
volumes:
|
volumes:
|
||||||
- ./nodejs/src/:/work/src
|
- ./nodejs/src/:/work
|
||||||
ports:
|
ports:
|
||||||
- 5502:5000
|
- 5502:5000
|
||||||
python: #docker run -it -v ${PWD}:/work -w /work -p 5003:5000 aimvector/python:1.0.0 /bin/sh
|
python: #docker run -it -v ${PWD}:/work -w /work -p 5003:5000 aimvector/python:1.0.0 /bin/sh
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
|
||||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/docker-existing-dockerfile
|
|
||||||
{
|
|
||||||
"name": "Existing Dockerfile",
|
|
||||||
|
|
||||||
// Sets the run context to one level up instead of the .devcontainer folder.
|
|
||||||
"context": "..",
|
|
||||||
|
|
||||||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
|
|
||||||
"dockerFile": "../Dockerfile",
|
|
||||||
|
|
||||||
// Set *default* container specific settings.json values on container create.
|
|
||||||
"settings": {
|
|
||||||
"terminal.integrated.shell.linux": null
|
|
||||||
},
|
|
||||||
|
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
|
||||||
"extensions": [],
|
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
||||||
"forwardPorts": [],
|
|
||||||
|
|
||||||
// Uncomment the next line to run commands after the container is created - for example installing curl.
|
|
||||||
// "postCreateCommand": "apt-get update && apt-get install -y curl",
|
|
||||||
|
|
||||||
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
|
|
||||||
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
|
|
||||||
|
|
||||||
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
|
|
||||||
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
|
|
||||||
|
|
||||||
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
|
|
||||||
// "remoteUser": "vscode"
|
|
||||||
}
|
|
@ -5,21 +5,12 @@ WORKDIR /work/
|
|||||||
|
|
||||||
COPY ./src/package.json /work/package.json
|
COPY ./src/package.json /work/package.json
|
||||||
RUN npm install
|
RUN npm install
|
||||||
RUN npm install -g nodemon
|
|
||||||
|
|
||||||
COPY ./src/ /work/src/
|
COPY ./src/ /work/
|
||||||
|
|
||||||
# ENTRYPOINT [ "nodemon", "--inspect=0.0.0.0:9229", "./src/server.js" ]
|
|
||||||
# ENTRYPOINT [ "/usr/bin/top" ]
|
|
||||||
CMD top
|
|
||||||
|
|
||||||
###########START NEW IMAGE###################
|
###########START NEW IMAGE###################
|
||||||
|
|
||||||
FROM node:12.4.0-alpine as prod
|
FROM dev as prod
|
||||||
|
|
||||||
WORKDIR /work/
|
CMD node .
|
||||||
COPY ./src/package.json /work/package.json
|
|
||||||
RUN npm install
|
|
||||||
COPY ./src/ /work/
|
|
||||||
|
|
||||||
CMD node .
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user