9 changed files with 104 additions and 42 deletions
@ -0,0 +1,23 @@ |
|||||||
|
**/.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 |
||||||
@ -0,0 +1,11 @@ |
|||||||
|
{ |
||||||
|
"configurations": [ |
||||||
|
{ |
||||||
|
"name": "Docker Node.js Launch and Attach", |
||||||
|
"type": "docker", |
||||||
|
"request": "launch", |
||||||
|
"preLaunchTask": "docker-run: debug", |
||||||
|
"platform": "node" |
||||||
|
} |
||||||
|
] |
||||||
|
} |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
{ |
||||||
|
"tasks": [ |
||||||
|
{ |
||||||
|
"type": "docker-build", |
||||||
|
"label": "docker-build", |
||||||
|
"platform": "node", |
||||||
|
"dockerBuild": { |
||||||
|
"dockerfile": "${workspaceFolder}/Dockerfile", |
||||||
|
"context": "${workspaceFolder}" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"type": "docker-run", |
||||||
|
"label": "docker-run: release", |
||||||
|
"dependsOn": [ |
||||||
|
"docker-build" |
||||||
|
], |
||||||
|
"platform": "node" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"type": "docker-run", |
||||||
|
"label": "docker-run: debug", |
||||||
|
"dependsOn": [ |
||||||
|
"docker-build" |
||||||
|
], |
||||||
|
"dockerRun": { |
||||||
|
"env": { |
||||||
|
"DEBUG": "*", |
||||||
|
"NODE_ENV": "development" |
||||||
|
} |
||||||
|
}, |
||||||
|
"node": { |
||||||
|
"enableDebugging": true |
||||||
|
} |
||||||
|
} |
||||||
|
] |
||||||
|
} |
||||||
@ -1,13 +1,7 @@ |
|||||||
FROM node:current-alpine AS builder |
FROM node:current-alpine AS builder |
||||||
|
WORKDIR /usr/src/app |
||||||
WORKDIR /app |
|
||||||
|
|
||||||
COPY /package.json /app/ |
COPY /package.json /app/ |
||||||
|
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] |
||||||
RUN apk add --no-cache git |
RUN apk add --no-cache git |
||||||
|
|
||||||
RUN npm install |
RUN npm install |
||||||
|
COPY . . |
||||||
COPY . /app/ |
|
||||||
|
|
||||||
CMD ["sh", "checkIsUp.sh"] |
|
||||||
|
|||||||
@ -1,2 +1,4 @@ |
|||||||
following instructions from: |
following instructions from: |
||||||
https://www.freecodecamp.org/news/how-to-enable-es6-and-beyond-syntax-with-node-and-express-68d3e11fe1ab/ |
https://www.freecodecamp.org/news/how-to-enable-es6-and-beyond-syntax-with-node-and-express-68d3e11fe1ab/ |
||||||
|
|
||||||
|
Can be used as a template for ES6 NodeJS projects. |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
version: '2.1' |
||||||
|
|
||||||
|
services: |
||||||
|
es6-nodejs: |
||||||
|
image: es6-nodejs |
||||||
|
container_name: es6-nodejs |
||||||
|
build: . |
||||||
|
environment: |
||||||
|
NODE_ENV: development |
||||||
|
ports: |
||||||
|
- 3001:3001 |
||||||
|
- 9229:9229 |
||||||
|
## set your startup file here |
||||||
|
command: node --inspect=0.0.0.0:9229 index.js |
||||||
@ -0,0 +1,12 @@ |
|||||||
|
version: '3.7' |
||||||
|
|
||||||
|
services: |
||||||
|
es6-nodejs: |
||||||
|
image: es6-nodejs |
||||||
|
container_name: es6-nodejs |
||||||
|
build: . |
||||||
|
ports: |
||||||
|
- 3001:3001 |
||||||
|
environment: |
||||||
|
- PORT=3001 |
||||||
|
command: ["npm","run","dev"] |
||||||
Loading…
Reference in new issue