├── 6 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 8 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 10 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 10.1 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 10.10 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 10.12 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 10.14 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 4.4 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 4.5 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 4.8 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 6.10 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 6.11 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 6.2 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 6.6 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 6.9 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 8.0 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 8.1 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 8.11 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 8.12 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 8.2 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 8.8 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 8.9 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── 9.4 ├── Dockerfile ├── hostingstart.html ├── ssh_setup.sh ├── sshd_config └── startup │ ├── default-static-site.js │ ├── init_container.sh │ ├── npm-shrinkwrap.json │ └── package.json ├── LICENSE ├── README.md ├── build.sh ├── jlawbuild.sh └── pull_request_template.md /10.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:10.1-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /10.1/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /10.1/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /10.1/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /10.1/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /10.1/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /10.1/startup/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "dependencies": { 5 | "accepts": { 6 | "version": "1.3.3", 7 | "from": "accepts@>=1.3.3 <1.4.0", 8 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz" 9 | }, 10 | "array-flatten": { 11 | "version": "1.1.1", 12 | "from": "array-flatten@1.1.1", 13 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" 14 | }, 15 | "content-disposition": { 16 | "version": "0.5.2", 17 | "from": "content-disposition@0.5.2", 18 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz" 19 | }, 20 | "content-type": { 21 | "version": "1.0.2", 22 | "from": "content-type@>=1.0.2 <1.1.0", 23 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz" 24 | }, 25 | "cookie": { 26 | "version": "0.3.1", 27 | "from": "cookie@0.3.1", 28 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz" 29 | }, 30 | "cookie-signature": { 31 | "version": "1.0.6", 32 | "from": "cookie-signature@1.0.6", 33 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" 34 | }, 35 | "debug": { 36 | "version": "2.6.7", 37 | "from": "debug@2.6.7", 38 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz" 39 | }, 40 | "depd": { 41 | "version": "1.1.0", 42 | "from": "depd@>=1.1.0 <1.2.0", 43 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz" 44 | }, 45 | "destroy": { 46 | "version": "1.0.4", 47 | "from": "destroy@>=1.0.4 <1.1.0", 48 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" 49 | }, 50 | "ee-first": { 51 | "version": "1.1.1", 52 | "from": "ee-first@1.1.1", 53 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" 54 | }, 55 | "encodeurl": { 56 | "version": "1.0.1", 57 | "from": "encodeurl@>=1.0.1 <1.1.0", 58 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz" 59 | }, 60 | "escape-html": { 61 | "version": "1.0.3", 62 | "from": "escape-html@>=1.0.3 <1.1.0", 63 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" 64 | }, 65 | "etag": { 66 | "version": "1.8.0", 67 | "from": "etag@>=1.8.0 <1.9.0", 68 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz" 69 | }, 70 | "express": { 71 | "version": "4.15.3", 72 | "from": "express@4.15.3", 73 | "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz" 74 | }, 75 | "finalhandler": { 76 | "version": "1.0.3", 77 | "from": "finalhandler@>=1.0.3 <1.1.0", 78 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz" 79 | }, 80 | "forwarded": { 81 | "version": "0.1.0", 82 | "from": "forwarded@>=0.1.0 <0.2.0", 83 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz" 84 | }, 85 | "fresh": { 86 | "version": "0.5.0", 87 | "from": "fresh@0.5.0", 88 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz" 89 | }, 90 | "http-errors": { 91 | "version": "1.6.1", 92 | "from": "http-errors@>=1.6.1 <1.7.0", 93 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz" 94 | }, 95 | "inherits": { 96 | "version": "2.0.3", 97 | "from": "inherits@2.0.3", 98 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" 99 | }, 100 | "ipaddr.js": { 101 | "version": "1.3.0", 102 | "from": "ipaddr.js@1.3.0", 103 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz" 104 | }, 105 | "media-typer": { 106 | "version": "0.3.0", 107 | "from": "media-typer@0.3.0", 108 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" 109 | }, 110 | "merge-descriptors": { 111 | "version": "1.0.1", 112 | "from": "merge-descriptors@1.0.1", 113 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" 114 | }, 115 | "methods": { 116 | "version": "1.1.2", 117 | "from": "methods@>=1.1.2 <1.2.0", 118 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" 119 | }, 120 | "mime": { 121 | "version": "1.3.4", 122 | "from": "mime@1.3.4", 123 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz" 124 | }, 125 | "mime-db": { 126 | "version": "1.27.0", 127 | "from": "mime-db@>=1.27.0 <1.28.0", 128 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz" 129 | }, 130 | "mime-types": { 131 | "version": "2.1.15", 132 | "from": "mime-types@>=2.1.11 <2.2.0", 133 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz" 134 | }, 135 | "ms": { 136 | "version": "2.0.0", 137 | "from": "ms@2.0.0", 138 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" 139 | }, 140 | "negotiator": { 141 | "version": "0.6.1", 142 | "from": "negotiator@0.6.1", 143 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz" 144 | }, 145 | "on-finished": { 146 | "version": "2.3.0", 147 | "from": "on-finished@>=2.3.0 <2.4.0", 148 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" 149 | }, 150 | "parseurl": { 151 | "version": "1.3.1", 152 | "from": "parseurl@>=1.3.1 <1.4.0", 153 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz" 154 | }, 155 | "path-to-regexp": { 156 | "version": "0.1.7", 157 | "from": "path-to-regexp@0.1.7", 158 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" 159 | }, 160 | "proxy-addr": { 161 | "version": "1.1.4", 162 | "from": "proxy-addr@>=1.1.4 <1.2.0", 163 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz" 164 | }, 165 | "qs": { 166 | "version": "6.4.0", 167 | "from": "qs@6.4.0", 168 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" 169 | }, 170 | "range-parser": { 171 | "version": "1.2.0", 172 | "from": "range-parser@>=1.2.0 <1.3.0", 173 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" 174 | }, 175 | "send": { 176 | "version": "0.15.3", 177 | "from": "send@0.15.3", 178 | "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz" 179 | }, 180 | "serve-static": { 181 | "version": "1.12.3", 182 | "from": "serve-static@1.12.3", 183 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz" 184 | }, 185 | "setprototypeof": { 186 | "version": "1.0.3", 187 | "from": "setprototypeof@1.0.3", 188 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz" 189 | }, 190 | "statuses": { 191 | "version": "1.3.1", 192 | "from": "statuses@>=1.3.1 <1.4.0", 193 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" 194 | }, 195 | "type-is": { 196 | "version": "1.6.15", 197 | "from": "type-is@>=1.6.15 <1.7.0", 198 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz" 199 | }, 200 | "unpipe": { 201 | "version": "1.0.0", 202 | "from": "unpipe@>=1.0.0 <1.1.0", 203 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" 204 | }, 205 | "utils-merge": { 206 | "version": "1.0.0", 207 | "from": "utils-merge@1.0.0", 208 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz" 209 | }, 210 | "vary": { 211 | "version": "1.1.1", 212 | "from": "vary@>=1.1.1 <1.2.0", 213 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz" 214 | } 215 | } 216 | } 217 | -------------------------------------------------------------------------------- /10.1/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /10.10/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:10.10-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /10.10/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /10.10/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /10.10/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /10.10/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /10.10/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /10.10/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /10.12/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:10.12-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /10.12/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /10.12/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /10.12/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /10.12/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /10.12/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /10.12/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /10.14/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:10.14-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /10.14/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /10.14/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /10.14/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /10.14/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /10.14/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /10.14/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /10/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:10-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /10/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /10/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /10/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /10/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /10/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /10/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /4.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:4.4-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /4.4/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /4.4/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /4.4/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /4.4/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /4.4/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /4.4/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /4.5/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:4.5-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /4.5/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /4.5/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /4.5/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /4.5/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /4.5/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /4.5/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /4.8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:4.8-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /4.8/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /4.8/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /4.8/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /4.8/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /4.8/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /4.8/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /6.10/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:6.10-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /6.10/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /6.10/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /6.10/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /6.10/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /6.10/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /6.10/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /6.11/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:6.11-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /6.11/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /6.11/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /6.11/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /6.11/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /6.11/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /6.11/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /6.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:6.2-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /6.2/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /6.2/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /6.2/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /6.2/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /6.2/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /6.2/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /6.6/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:6.6-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /6.6/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /6.6/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /6.6/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /6.6/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /6.6/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /6.6/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /6.9/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:6.9-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /6.9/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /6.9/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /6.9/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /6.9/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /6.9/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /6.9/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /6/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:6-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /6/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /6/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /6/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /6/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /6/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /6/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /8.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:8.0-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /8.0/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /8.0/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /8.0/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /8.0/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /8.0/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /8.0/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /8.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:8.1-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /8.1/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /8.1/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /8.1/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /8.1/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /8.1/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /8.1/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /8.11/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:8.11-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /8.11/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /8.11/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /8.11/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /8.11/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /8.11/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /8.11/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /8.12/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:8.12-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /8.12/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /8.12/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /8.12/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /8.12/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /8.12/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /8.12/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /8.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:8.2-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /8.2/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /8.2/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /8.2/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /8.2/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /8.2/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /8.2/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /8.8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:8.8-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /8.8/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /8.8/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /8.8/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /8.8/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /8.8/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /8.8/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /8.9/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:8.9-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /8.9/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /8.9/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /8.9/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /8.9/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /8.9/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /8.9/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:8-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /8/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /8/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /8/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /8/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /8/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /8/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /9.4/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/oryx/node:9.4-20190708.2 2 | LABEL maintainer="Azure App Services Container Images " 3 | 4 | RUN echo "ipv6" >> /etc/modules 5 | 6 | RUN npm install -g pm2 \ 7 | && mkdir -p /home/LogFiles /opt/startup \ 8 | && echo "root:Docker!" | chpasswd \ 9 | && echo "cd /home" >> /etc/bash.bashrc \ 10 | && apt-get update \ 11 | && apt-get install --yes --no-install-recommends openssh-server vim curl wget tcptraceroute openrc 12 | 13 | # setup default site 14 | RUN rm -f /etc/ssh/sshd_config 15 | COPY startup /opt/startup 16 | COPY hostingstart.html /opt/startup 17 | 18 | # configure startup 19 | RUN mkdir -p /tmp 20 | COPY sshd_config /etc/ssh/ 21 | 22 | COPY ssh_setup.sh /tmp 23 | RUN chmod -R +x /opt/startup \ 24 | && chmod -R +x /tmp/ssh_setup.sh \ 25 | && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ 26 | && rm -rf /tmp/* \ 27 | && cd /opt/startup \ 28 | && npm install 29 | 30 | ENV PORT 8080 31 | ENV SSH_PORT 2222 32 | EXPOSE 2222 8080 33 | 34 | ENV PM2HOME /pm2home 35 | 36 | ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance 37 | ENV WEBSITE_INSTANCE_ID localInstance 38 | ENV PATH ${PATH}:/home/site/wwwroot 39 | 40 | WORKDIR /home/site/wwwroot 41 | 42 | ENTRYPOINT ["/opt/startup/init_container.sh"] 43 | -------------------------------------------------------------------------------- /9.4/hostingstart.html: -------------------------------------------------------------------------------- 1 | Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

-------------------------------------------------------------------------------- /9.4/ssh_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then 4 | # generate fresh rsa key 5 | ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa 6 | fi 7 | 8 | if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then 9 | # generate fresh dsa key 10 | ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa 11 | fi 12 | 13 | if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then 14 | # generate fresh ecdsa key 15 | ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa 16 | fi 17 | 18 | if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then 19 | # generate fresh ecdsa key 20 | ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa 21 | fi 22 | 23 | #prepare run dir 24 | if [ ! -d "/var/run/sshd" ]; then 25 | mkdir -p /var/run/sshd 26 | fi 27 | -------------------------------------------------------------------------------- /9.4/sshd_config: -------------------------------------------------------------------------------- 1 | # This is ssh server systemwide configuration file. 2 | # 3 | # /etc/sshd_config 4 | 5 | Port SSH_PORT 6 | ListenAddress 0.0.0.0 7 | LoginGraceTime 180 8 | X11Forwarding yes 9 | Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr 10 | MACs hmac-sha1,hmac-sha1-96 11 | StrictModes yes 12 | SyslogFacility DAEMON 13 | PasswordAuthentication yes 14 | PermitEmptyPasswords no 15 | PermitRootLogin yes 16 | Subsystem sftp internal-sftp 17 | -------------------------------------------------------------------------------- /9.4/startup/default-static-site.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var server = express(); 3 | var options = { 4 | index: ['index.html','hostingstart.html'] 5 | }; 6 | server.use('/', express.static('/opt/startup', options)); 7 | server.listen(process.env.PORT); 8 | -------------------------------------------------------------------------------- /9.4/startup/init_container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat >/etc/motd < 8 | \/ \/ \/ 9 | A P P S E R V I C E O N L I N U X 10 | 11 | Documentation: http://aka.ms/webapp-linux 12 | NodeJS quickstart: https://aka.ms/node-qs 13 | NodeJS Version : `node --version` 14 | 15 | EOL 16 | cat /etc/motd 17 | 18 | mkdir "$PM2HOME" 19 | chmod 777 "$PM2HOME" 20 | ln -s /home/LogFiles "$PM2HOME"/logs 21 | 22 | # Get environment variables to show up in SSH session 23 | eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) 24 | 25 | # starting sshd process 26 | sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config 27 | /usr/sbin/sshd 28 | 29 | STARTUP_COMMAND_PATH="/opt/startup/startup.sh" 30 | ORYX_ARGS="-appPath /home/site/wwwroot -output $STARTUP_COMMAND_PATH -usePM2 -defaultApp=/opt/startup/default-static-site.js -userStartupCommand '$@'" 31 | 32 | if [ $APPSVC_REMOTE_DEBUGGING == "TRUE" ]; then 33 | ORYX_ARGS="-remoteDebug -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 34 | elif [ "$APPSVC_REMOTE_DEBUGGING_BREAK" == "TRUE" ]; then 35 | ORYX_ARGS="-remoteDebugBrk -debugPort $APPSVC_TUNNEL_PORT $ORYX_ARGS" 36 | fi 37 | 38 | if [ -f "oryx-manifest.toml" ] && [ "$APPSVC_RUN_ZIP" = "TRUE" ]; then 39 | # NPM adds the current directory's node_modules/.bin folder to PATH before it runs, so commands in 40 | # "npm start" can files there. Since we move node_modules, we have to add it to the path ourselves. 41 | echo 'Fixing up path' 42 | export PATH=/node_modules/.bin:$PATH 43 | echo "$PATH" 44 | fi 45 | 46 | eval oryx $ORYX_ARGS 47 | 48 | STARTUPCOMMAND=$(cat $STARTUP_COMMAND_PATH) 49 | echo "Running $STARTUPCOMMAND" 50 | $STARTUP_COMMAND_PATH 51 | -------------------------------------------------------------------------------- /9.4/startup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-static-site", 3 | "version": "1.0.0", 4 | "description": "Express-driven static site hosted from default App Service wwwroot directory", 5 | "main": "default-static-site.js", 6 | "dependencies": { 7 | "express": "4.15.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "author": "Azure App Services Container Images ", 14 | "license": "Apache-2.0" 15 | } 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NodeJS on Azure App Service 2 | 3 | This repository contains Docker images for NodeJS for running on Azure App Service. 4 | 5 | ## Templates 6 | These images are autogenerated based upon https://github.com/Azure-App-Service/node-template 7 | 8 | ## Image Repository 9 | https://hub.docker.com/r/appsvc/node/ 10 | 11 | ## Known issues 12 | Currently, due to line ending issues, building and running on a Windows machine causes issues during the container startup. This will be fixed soon. 13 | 14 | ## Issues 15 | Issues are infrequently monitored, for immediate support please contact Azure Support. Suggestions with accompanying Pull Requests are encouraged. 16 | 17 | ## Pull Requests 18 | Please send pull requests to https://github.com/Azure-App-Service/node-template 19 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -x -e 3 | 4 | buildnumber=${4-$(date -u +"%y%m%d%H%M")} 5 | 6 | docker build --no-cache -t "$1"/node:4.4.7_"$buildnumber" 4.4.7 7 | docker build --no-cache -t "$1"/node:4.5.0_"$buildnumber" 4.5.0 8 | docker build --no-cache -t "$1"/node:4.8.3_"$buildnumber" 4.8.3 9 | docker build --no-cache -t "$1"/node:4.8.4_"$buildnumber" 4.8.4 10 | docker build --no-cache -t "$1"/node:6.2.2_"$buildnumber" 6.2.2 11 | docker build --no-cache -t "$1"/node:6.6.0_"$buildnumber" 6.6.0 12 | docker build --no-cache -t "$1"/node:6.9.3_"$buildnumber" 6.9.3 13 | docker build --no-cache -t "$1"/node:6.10.3_"$buildnumber" 6.10.3 14 | docker build --no-cache -t "$1"/node:6.11.0_"$buildnumber" 6.11.0 15 | docker build --no-cache -t "$1"/node:6.11.1_"$buildnumber" 6.11.1 16 | docker build --no-cache -t "$1"/node:6.11.5_"$buildnumber" 6.11.5 17 | docker build --no-cache -t "$1"/node:8.0.0_"$buildnumber" 8.0.0 18 | docker build --no-cache -t "$1"/node:8.1.2_"$buildnumber" 8.1.2 19 | docker build --no-cache -t "$1"/node:8.1.3_"$buildnumber" 8.1.3 20 | docker build --no-cache -t "$1"/node:8.1.4_"$buildnumber" 8.1.4 21 | docker build --no-cache -t "$1"/node:8.2.1_"$buildnumber" 8.2.1 22 | docker build --no-cache -t "$1"/node:8.8.0_"$buildnumber" 8.8.0 23 | docker build --no-cache -t "$1"/node:8.8.1_"$buildnumber" 8.8.1 24 | docker build --no-cache -t "$1"/node:8.9.4_"$buildnumber" 8.9.4 25 | docker build --no-cache -t "$1"/node:8.11.4_"$buildnumber" 8.11.4 26 | docker build --no-cache -t "$1"/node:8.12.0_"$buildnumber" -t "$1"/node:lts_"$buildnumber" 8.12.0 27 | docker tag "$1"/node:lts_"$buildnumber" "$1"/node:lts 28 | docker build --no-cache -t "$1"/node:9.4.0_"$buildnumber" 9.4.0 29 | docker build --no-cache -t "$1"/node:10.1.0_"$buildnumber" 10.1.0 30 | docker build --no-cache -t "$1"/node:10.10.0_"$buildnumber" -t "$1"/node:latest_"$buildnumber" 10.10.0 31 | docker build --no-cache -t "$1"/node:10.14.1_"$buildnumber" 10.14.1 32 | docker tag "$1"/node:latest_"$buildnumber" "$1"/node:latest 33 | 34 | docker login -u "$2" -p "$3" 35 | 36 | docker push "$1"/node:4.4.7_"$buildnumber" 37 | docker push "$1"/node:4.5.0_"$buildnumber" 38 | docker push "$1"/node:4.8.3_"$buildnumber" 39 | docker push "$1"/node:4.8.4_"$buildnumber" 40 | docker push "$1"/node:6.2.2_"$buildnumber" 41 | docker push "$1"/node:6.6.0_"$buildnumber" 42 | docker push "$1"/node:6.9.3_"$buildnumber" 43 | docker push "$1"/node:6.10.3_"$buildnumber" 44 | docker push "$1"/node:6.11.0_"$buildnumber" 45 | docker push "$1"/node:6.11.1_"$buildnumber" 46 | docker push "$1"/node:6.11.5_"$buildnumber" 47 | docker push "$1"/node:8.0.0_"$buildnumber" 48 | docker push "$1"/node:8.1.2_"$buildnumber" 49 | docker push "$1"/node:8.1.3_"$buildnumber" 50 | docker push "$1"/node:8.1.4_"$buildnumber" 51 | docker push "$1"/node:8.2.1_"$buildnumber" 52 | docker push "$1"/node:8.8.0_"$buildnumber" 53 | docker push "$1"/node:8.8.1_"$buildnumber" 54 | docker push "$1"/node:8.9.4_"$buildnumber" 55 | docker push "$1"/node:8.11.4_"$buildnumber" 56 | docker push "$1"/node:8.12.0_"$buildnumber" 57 | docker push "$1"/node:lts_"$buildnumber" 58 | docker push "$1"/node:lts 59 | docker push "$1"/node:9.4.0_"$buildnumber" 60 | docker push "$1"/node:10.1.0_"$buildnumber" 61 | docker push "$1"/node:10.10.0_"$buildnumber" 62 | docker push "$1"/node:10.14.1_"$buildnumber" 63 | docker push "$1"/node:latest_"$buildnumber" 64 | docker push "$1"/node:latest 65 | 66 | docker logout 67 | -------------------------------------------------------------------------------- /jlawbuild.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -x -e 3 | 4 | buildnumber=${4-$(date -u +"%y%m%d%H%M")} 5 | 6 | docker build -t "$1"/node:4.4_"$buildnumber" 4.4.7 7 | docker build -t "$1"/node:4.5_"$buildnumber" 4.5.0 8 | docker build -t "$1"/node:4.8_"$buildnumber" 4.8.4 9 | docker build -t "$1"/node:6.2_"$buildnumber" 6.2.2 10 | docker build -t "$1"/node:6.6_"$buildnumber" 6.6.0 11 | docker build -t "$1"/node:6.9_"$buildnumber" 6.9.3 12 | docker build -t "$1"/node:6.10_"$buildnumber" 6.10.3 13 | docker build -t "$1"/node:6.11_"$buildnumber" 6.11.5 14 | docker build -t "$1"/node:8.0_"$buildnumber" 8.0.0 15 | docker build -t "$1"/node:8.1_"$buildnumber" 8.1.4 16 | docker build -t "$1"/node:8.2_"$buildnumber" 8.2.1 17 | docker build -t "$1"/node:8.8_"$buildnumber" 8.8.1 18 | docker build -t "$1"/node:8.9_"$buildnumber" 8.9.4 19 | docker build -t "$1"/node:8.11_"$buildnumber" 8.11.4 20 | docker build -t "$1"/node:8.12_"$buildnumber" -t "$1"/node:lts_"$buildnumber" 8.12.0 21 | docker tag "$1"/node:lts_"$buildnumber" "$1"/node:lts 22 | docker build -t "$1"/node:9.4_"$buildnumber" 9.4.0 23 | docker build -t "$1"/node:10.1_"$buildnumber" 10.1.0 24 | docker build -t "$1"/node:10.10_"$buildnumber" -t "$1"/node:latest_"$buildnumber" 10.10.0 25 | docker build -t "$1"/node:10.14_"$buildnumber" 10.14.1 26 | docker tag "$1"/node:latest_"$buildnumber" "$1"/node:latest 27 | 28 | #docker login -u "$2" -p "$3" 29 | 30 | 31 | #docker push "$1"/node:4.4_"$buildnumber" 32 | #docker push "$1"/node:4.5.0_"$buildnumber" 33 | #docker push "$1"/node:4.8.3_"$buildnumber" 34 | #docker push "$1"/node:4.8.4_"$buildnumber" 35 | #docker push "$1"/node:6.2.2_"$buildnumber" 36 | #docker push "$1"/node:6.6.0_"$buildnumber" 37 | #docker push "$1"/node:6.9.3_"$buildnumber" 38 | #docker push "$1"/node:6.10.3_"$buildnumber" 39 | #docker push "$1"/node:6.11.0_"$buildnumber" 40 | #docker push "$1"/node:6.11.1_"$buildnumber" 41 | #docker push "$1"/node:6.11.5_"$buildnumber" 42 | #docker push "$1"/node:8.0.0_"$buildnumber" 43 | #docker push "$1"/node:8.1.2_"$buildnumber" 44 | #docker push "$1"/node:8.1.3_"$buildnumber" 45 | #docker push "$1"/node:8.1.4_"$buildnumber" 46 | #docker push "$1"/node:8.2.1_"$buildnumber" 47 | #docker push "$1"/node:8.8.0_"$buildnumber" 48 | #docker push "$1"/node:8.8.1_"$buildnumber" 49 | #docker push "$1"/node:8.9.4_"$buildnumber" 50 | #docker push "$1"/node:8.11.4_"$buildnumber" 51 | #docker push "$1"/node:8.12.0_"$buildnumber" 52 | #docker push "$1"/node:lts_"$buildnumber" 53 | #docker push "$1"/node:lts 54 | #docker push "$1"/node:9.4.0_"$buildnumber" 55 | #docker push "$1"/node:10.1.0_"$buildnumber" 56 | #docker push "$1"/node:10.10.0_"$buildnumber" 57 | #docker push "$1"/node:latest_"$buildnumber" 58 | #docker push "$1"/node:latest 59 | 60 | #docker logout 61 | -------------------------------------------------------------------------------- /pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | --------------------------- 4 | * [ ] Are these changes auto-generated from [node-template](https://github.com/Azure-App-Service/node-template) 5 | * [ ] Have you made the same changes to [node-template](https://github.com/Azure-App-Service/node-template) 6 | --------------------------------------------------------------------------------