-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sample: SSO sample for Microsoft Teams tab app (#2196)
* Initial commit * Fix broken link * Update build pipeline * Add comments * Update path * Fix link * Update docs * Remove config page * Typo * Clean up * Add entry * Add entry * Rename to webchat-sso-teams-* * Typo * Apply suggestions from code review Co-Authored-By: Corina <[email protected]> * Apply suggestions from code review Co-Authored-By: Corina <[email protected]> * Fix typos * Typo * Emphasize * Fix link
- Loading branch information
Showing
41 changed files
with
4,200 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/bot/.env | ||
/bot/node_modules | ||
/web/.env | ||
/web/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This container is for simplifying CI when using Azure Pipelines | ||
FROM node:12 | ||
|
||
# Copy the bot code to /var/bot/ | ||
ADD bot/ /var/build/bot/ | ||
|
||
# Copy the web server code to /var/web/ | ||
ADD web/ /var/build/web/ | ||
|
||
# Copy SSH configuration and startup script to /var/ | ||
# Adopted from https://github.com/Azure-App-Service/node/blob/master/10.14/sshd_config | ||
ADD init.sh /var/build/ | ||
ADD sshd_config /var/build/ | ||
|
||
# Doing a fresh "npm install" on build to make sure the image is reproducible | ||
WORKDIR /var/build/bot/ | ||
RUN npm ci | ||
|
||
# Doing a fresh "npm install" on build to make sure the image is reproducible | ||
WORKDIR /var/build/web/ | ||
RUN npm ci | ||
|
||
# Pack "concurrently" to make sure the image is reproducible | ||
WORKDIR /var/build/ | ||
RUN npm install [email protected] | ||
|
||
# Pack the build content as a "build.tgz" and export it out | ||
RUN tar -cf build.tgz * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This is the container for running the demo under Azure Web App | ||
FROM node:12 | ||
|
||
# Expose both port 80 and 2222 (SSH for Azure Web App) | ||
EXPOSE 80 2222 | ||
|
||
WORKDIR /var/ | ||
|
||
# Extract build image to /var/ | ||
ADD build.tgz /var/ | ||
|
||
# Setup OpenSSH for debugging thru Azure Web App | ||
# https://docs.microsoft.com/en-us/azure/app-service/containers/app-service-linux-ssh-support#ssh-support-with-custom-docker-images | ||
# https://docs.microsoft.com/en-us/azure/app-service/containers/tutorial-custom-docker-image | ||
ENV SSH_PASSWD "root:Docker!" | ||
ENV SSH_PORT 2222 | ||
RUN \ | ||
apt-get update \ | ||
&& apt-get install -y --no-install-recommends dialog \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends openssh-server \ | ||
&& echo "$SSH_PASSWD" | chpasswd \ | ||
&& mv /var/sshd_config /etc/ssh/ \ | ||
&& mv /var/init.sh /usr/local/bin/ \ | ||
&& chmod u+x /usr/local/bin/init.sh | ||
|
||
# Set up entrypoint | ||
ENTRYPOINT init.sh |
Oops, something went wrong.