diff --git a/templates/basic-js/.dockerignore b/templates/basic-js/.dockerignore new file mode 100644 index 0000000000..c961acb505 --- /dev/null +++ b/templates/basic-js/.dockerignore @@ -0,0 +1,12 @@ +**/node_modules/ +**/.git +**/README.md +**/LICENSE +**/.vscode +**/npm-debug.log +**/coverage +**/.env +**/.editorconfig +**/dist +**/*.pem +Dockerfile diff --git a/templates/basic-js/Dockerfile b/templates/basic-js/Dockerfile new file mode 100644 index 0000000000..df02fe4831 --- /dev/null +++ b/templates/basic-js/Dockerfile @@ -0,0 +1,8 @@ +FROM node:12-slim +WORKDIR /usr/src/app +COPY package.json package-lock.json ./ +RUN npm ci --production +RUN npm cache clean --force +ENV NODE_ENV="production" +COPY . . +CMD [ "npm", "start" ] diff --git a/templates/basic-js/README.md b/templates/basic-js/README.md index 4f7f22a5cb..b043ef2cc9 100644 --- a/templates/basic-js/README.md +++ b/templates/basic-js/README.md @@ -12,6 +12,16 @@ npm install npm start ``` +## Docker + +```sh +# 1. Build container +docker build -t {{ appName }} . + +# 2. Start container +docker run -e APP_ID= -e PRIVATE_KEY= {{ appName }} +``` + ## Contributing If you have suggestions for how {{ appName }} could be improved, or want to report a bug, open an issue! We'd love all and any contributions. diff --git a/templates/basic-ts/.dockerignore b/templates/basic-ts/.dockerignore new file mode 100644 index 0000000000..c961acb505 --- /dev/null +++ b/templates/basic-ts/.dockerignore @@ -0,0 +1,12 @@ +**/node_modules/ +**/.git +**/README.md +**/LICENSE +**/.vscode +**/npm-debug.log +**/coverage +**/.env +**/.editorconfig +**/dist +**/*.pem +Dockerfile diff --git a/templates/basic-ts/Dockerfile b/templates/basic-ts/Dockerfile new file mode 100644 index 0000000000..313710170b --- /dev/null +++ b/templates/basic-ts/Dockerfile @@ -0,0 +1,16 @@ +FROM node:12-slim AS build +WORKDIR /usr/src/app +COPY package.json package-lock.json ./ +RUN npm ci +COPY . . +RUN npm run build + +FROM node:12-slim +WORKDIR /usr/src/app +COPY package.json package-lock.json ./ +RUN npm ci +RUN npm cache clean --force +COPY --from=build /usr/src/app/lib lib + +ENV NODE_ENV="production" +CMD [ "npm", "start" ] diff --git a/templates/basic-ts/README.md b/templates/basic-ts/README.md index 77a7ba5285..92385eae2a 100755 --- a/templates/basic-ts/README.md +++ b/templates/basic-ts/README.md @@ -15,6 +15,16 @@ npm run build npm run start ``` +## Docker + +```sh +# 1. Build container +docker build -t {{ appName }} . + +# 2. Start container +docker run -e APP_ID= -e PRIVATE_KEY= {{ appName }} +``` + ## Contributing If you have suggestions for how {{ appName }} could be improved, or want to report a bug, open an issue! We'd love all and any contributions. diff --git a/templates/checks-js/.dockerignore b/templates/checks-js/.dockerignore new file mode 100644 index 0000000000..c961acb505 --- /dev/null +++ b/templates/checks-js/.dockerignore @@ -0,0 +1,12 @@ +**/node_modules/ +**/.git +**/README.md +**/LICENSE +**/.vscode +**/npm-debug.log +**/coverage +**/.env +**/.editorconfig +**/dist +**/*.pem +Dockerfile diff --git a/templates/checks-js/Dockerfile b/templates/checks-js/Dockerfile new file mode 100644 index 0000000000..df02fe4831 --- /dev/null +++ b/templates/checks-js/Dockerfile @@ -0,0 +1,8 @@ +FROM node:12-slim +WORKDIR /usr/src/app +COPY package.json package-lock.json ./ +RUN npm ci --production +RUN npm cache clean --force +ENV NODE_ENV="production" +COPY . . +CMD [ "npm", "start" ] diff --git a/templates/checks-js/README.md b/templates/checks-js/README.md index 4f7f22a5cb..b043ef2cc9 100644 --- a/templates/checks-js/README.md +++ b/templates/checks-js/README.md @@ -12,6 +12,16 @@ npm install npm start ``` +## Docker + +```sh +# 1. Build container +docker build -t {{ appName }} . + +# 2. Start container +docker run -e APP_ID= -e PRIVATE_KEY= {{ appName }} +``` + ## Contributing If you have suggestions for how {{ appName }} could be improved, or want to report a bug, open an issue! We'd love all and any contributions. diff --git a/templates/deploy-js/.dockerignore b/templates/deploy-js/.dockerignore new file mode 100644 index 0000000000..c961acb505 --- /dev/null +++ b/templates/deploy-js/.dockerignore @@ -0,0 +1,12 @@ +**/node_modules/ +**/.git +**/README.md +**/LICENSE +**/.vscode +**/npm-debug.log +**/coverage +**/.env +**/.editorconfig +**/dist +**/*.pem +Dockerfile diff --git a/templates/deploy-js/Dockerfile b/templates/deploy-js/Dockerfile new file mode 100644 index 0000000000..df02fe4831 --- /dev/null +++ b/templates/deploy-js/Dockerfile @@ -0,0 +1,8 @@ +FROM node:12-slim +WORKDIR /usr/src/app +COPY package.json package-lock.json ./ +RUN npm ci --production +RUN npm cache clean --force +ENV NODE_ENV="production" +COPY . . +CMD [ "npm", "start" ] diff --git a/templates/deploy-js/README.md b/templates/deploy-js/README.md index 4f7f22a5cb..b043ef2cc9 100644 --- a/templates/deploy-js/README.md +++ b/templates/deploy-js/README.md @@ -12,6 +12,16 @@ npm install npm start ``` +## Docker + +```sh +# 1. Build container +docker build -t {{ appName }} . + +# 2. Start container +docker run -e APP_ID= -e PRIVATE_KEY= {{ appName }} +``` + ## Contributing If you have suggestions for how {{ appName }} could be improved, or want to report a bug, open an issue! We'd love all and any contributions. diff --git a/templates/git-data-js/.dockerignore b/templates/git-data-js/.dockerignore new file mode 100644 index 0000000000..c961acb505 --- /dev/null +++ b/templates/git-data-js/.dockerignore @@ -0,0 +1,12 @@ +**/node_modules/ +**/.git +**/README.md +**/LICENSE +**/.vscode +**/npm-debug.log +**/coverage +**/.env +**/.editorconfig +**/dist +**/*.pem +Dockerfile diff --git a/templates/git-data-js/Dockerfile b/templates/git-data-js/Dockerfile new file mode 100644 index 0000000000..df02fe4831 --- /dev/null +++ b/templates/git-data-js/Dockerfile @@ -0,0 +1,8 @@ +FROM node:12-slim +WORKDIR /usr/src/app +COPY package.json package-lock.json ./ +RUN npm ci --production +RUN npm cache clean --force +ENV NODE_ENV="production" +COPY . . +CMD [ "npm", "start" ] diff --git a/templates/git-data-js/README.md b/templates/git-data-js/README.md index 4f7f22a5cb..b043ef2cc9 100644 --- a/templates/git-data-js/README.md +++ b/templates/git-data-js/README.md @@ -12,6 +12,16 @@ npm install npm start ``` +## Docker + +```sh +# 1. Build container +docker build -t {{ appName }} . + +# 2. Start container +docker run -e APP_ID= -e PRIVATE_KEY= {{ appName }} +``` + ## Contributing If you have suggestions for how {{ appName }} could be improved, or want to report a bug, open an issue! We'd love all and any contributions.