-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from uwwebservices/eval
Eval to Master
- Loading branch information
Showing
52 changed files
with
17,650 additions
and
14,022 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
# Based on Microsoft's Node 10 example | ||
# To fully customize the contents of this image, use the following Dockerfile instead: | ||
# https://github.com/microsoft/vscode-dev-containers/tree/v0.128.0/containers/javascript-node-10/.devcontainer/Dockerfile | ||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node@sha256:567574eac6192c01ea2c725573ecfe6f4873384097caca222de1568231518924 | ||
|
||
RUN apt-get update \ | ||
&& export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \ | ||
# | ||
# install git iproute2, required tools installed | ||
&& apt-get install -y \ | ||
git \ | ||
vim \ | ||
openssh-client \ | ||
less \ | ||
curl \ | ||
procps \ | ||
unzip \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
gnupg-agent \ | ||
software-properties-common \ | ||
lsb-release 2>&1 \ | ||
# | ||
# Clean up | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# Based on Microsoft's Node 10 example | ||
# To fully customize the contents of this image, use the following Dockerfile instead: | ||
# https://github.com/microsoft/vscode-dev-containers/tree/v0.128.0/containers/javascript-node-10/.devcontainer/Dockerfile | ||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-14 | ||
|
||
RUN apt-get update \ | ||
&& export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \ | ||
# | ||
# install git iproute2, required tools installed | ||
&& apt-get install -y \ | ||
git \ | ||
vim \ | ||
openssh-client \ | ||
less \ | ||
curl \ | ||
procps \ | ||
unzip \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
gnupg-agent \ | ||
software-properties-common \ | ||
lsb-release 2>&1 \ | ||
# | ||
# Clean up | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,44 @@ | ||
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.128.0/containers/javascript-node-10 | ||
{ | ||
"name": "UWER", | ||
"dockerFile": "Dockerfile", | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash" | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"ms-azuretools.vscode-docker" | ||
], | ||
|
||
"runArgs": [ | ||
"-p", | ||
"1111:1111", | ||
"-v", | ||
"${env:HOME}${env:USERPROFILE}/.ssh:/node/.ssh-localhost:ro", | ||
"-v", | ||
"${env:HOME}${env:USERPROFILE}/.aws:/node/.aws-localhost:ro" | ||
], | ||
|
||
"postCreateCommand": "mkdir -p $HOME/.ssh && cp -r /node/.ssh-localhost/* $HOME/.ssh && chmod 700 $HOME/.ssh && chmod 600 $HOME/.ssh/* && mkdir -p $HOME/.aws && cp -r /node/.aws-localhost/* $HOME/.aws && chmod 700 $HOME/.aws && chmod 600 $HOME/.aws/*", | ||
|
||
// Uncomment to connect as a non-root user. See https://aka.ms/node-remote/containers/non-root. | ||
"remoteUser": "node" | ||
} | ||
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.128.0/containers/javascript-node-10 | ||
{ | ||
"name": "UWER", | ||
"dockerFile": "Dockerfile", | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash" | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"ms-azuretools.vscode-docker", | ||
"donjayamanne.githistory" | ||
], | ||
|
||
"runArgs": [ | ||
"-p", | ||
"1111:1111", | ||
"-v", | ||
"${env:HOME}${env:USERPROFILE}/.ssh:/node/.ssh-localhost:ro", | ||
"-v", | ||
"${env:HOME}${env:USERPROFILE}/.aws:/node/.aws-localhost:ro" | ||
], | ||
|
||
// Enable file watching within the container | ||
"containerEnv": { | ||
"CHOKIDAR_USEPOLLING": "true" | ||
}, | ||
|
||
// Mount a named volume to speed up installing/building node packages | ||
"mounts": [ | ||
"source=uwer-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume" | ||
], | ||
|
||
// Copy ssh & aws keys; setup permissions on the named volume in node_modules | ||
"postCreateCommand": "mkdir -p $HOME/.ssh && cp -r /node/.ssh-localhost/* $HOME/.ssh && chmod 700 $HOME/.ssh && chmod 600 $HOME/.ssh/* && mkdir -p $HOME/.aws && cp -r /node/.aws-localhost/* $HOME/.aws && chmod 700 $HOME/.aws && chmod 600 $HOME/.aws/* && sudo chown node node_modules", | ||
|
||
// Uncomment to connect as a non-root user. See https://aka.ms/node-remote/containers/non-root. | ||
"remoteUser": "node" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,32 @@ | ||
{ | ||
"globals": { "Promise": true, "process": true }, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings" | ||
], | ||
"parser": "babel-eslint", | ||
"parserOptions": { | ||
"ecmaVersion": 9, | ||
"ecmaVersion": 2018, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
"jsx": true | ||
} | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
"rules": { | ||
"no-debugger": "off", | ||
"no-console": "off", | ||
"no-unused-vars": "warn", | ||
"react/prop-types": "warn" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"jsxBracketSameLine": false, | ||
"jsxSingleQuote": false, | ||
"printWidth": 240, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
{ | ||
// 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": [ | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
"name": "Attach by Process ID", | ||
"processId": "${command:PickProcess}", | ||
"restart": true, | ||
"protocol": "inspector" | ||
} | ||
] | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node-terminal", | ||
"name": "Run Script: dev", | ||
"request": "launch", | ||
"command": "npm run dev", | ||
"cwd": "${workspaceFolder}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,37 @@ | ||
# ---- Base Node ---- | ||
FROM node:10.4.1-alpine AS base | ||
RUN apk add --no-cache nodejs-current tini | ||
WORKDIR /www | ||
# Set tini as entrypoint | ||
ENTRYPOINT ["/sbin/tini", "--"] | ||
# copy project file | ||
COPY package.json . | ||
|
||
# ---- Dependencies ---- | ||
FROM base AS dependencies | ||
# install git to pull down ews-api-lib | ||
RUN apk update && apk upgrade && apk add --no-cache git | ||
# install node packages | ||
RUN npm set progress=false && npm config set depth 0 | ||
RUN npm install --only=production | ||
# copy production node_modules aside | ||
RUN cp -R node_modules prod_node_modules | ||
# install ALL node_modules, including 'devDependencies' | ||
RUN npm install | ||
COPY . . | ||
# build the project | ||
RUN npm run build | ||
|
||
# ---- Release ---- | ||
FROM base AS release | ||
# copy production node_modules | ||
COPY --from=dependencies /www/prod_node_modules /www/node_modules | ||
|
||
# copy only the things we need for production | ||
COPY --from=dependencies /www/dist /www/dist | ||
COPY --from=dependencies /www/config_base /www/config_base | ||
|
||
# sp-key.pem is injected by Azure DevOps, copy it to a better location | ||
COPY sp-key.pem /www/config/sp-key.pem | ||
|
||
EXPOSE 1111 | ||
# ---- Base Node ---- | ||
FROM node:14.11.0-alpine AS base | ||
RUN apk add --no-cache nodejs-current tini | ||
WORKDIR /www | ||
# Set tini as entrypoint | ||
ENTRYPOINT ["/sbin/tini", "--"] | ||
# copy project file | ||
COPY package.json . | ||
|
||
# ---- Dependencies ---- | ||
FROM base AS dependencies | ||
# install git to pull down ews-api-lib | ||
RUN apk update && apk upgrade && apk add --no-cache git | ||
# install node packages | ||
RUN npm set progress=false && npm config set depth 0 | ||
RUN npm install --only=production | ||
# copy production node_modules aside | ||
RUN cp -R node_modules prod_node_modules | ||
# install ALL node_modules, including 'devDependencies' | ||
RUN npm install | ||
COPY . . | ||
# build the project | ||
RUN npm run build | ||
|
||
# ---- Release ---- | ||
FROM base AS release | ||
# copy production node_modules | ||
COPY --from=dependencies /www/prod_node_modules /www/node_modules | ||
|
||
# copy only the things we need for production | ||
COPY --from=dependencies /www/dist /www/dist | ||
|
||
# sp-key.pem is injected by Azure DevOps, copy it to a better location | ||
COPY sp-key.pem /www/config/sp-key.pem | ||
|
||
EXPOSE 1111 | ||
CMD npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.