-
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.
- Loading branch information
Showing
82 changed files
with
25,078 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"lerna": "3.19.0", | ||
"packages": [ | ||
"packages/*" | ||
"packages/*", | ||
"samples/07.advanced-web-chat-apps/e.soo-on-behalf-of-authentication/app" | ||
], | ||
"version": "0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import useWebChatUIContext from './internal/useWebChatUIContext'; | ||
|
||
export default function useSetNotification() { | ||
console.log(useWebChatUIContext()); | ||
return useWebChatUIContext().setNotification; | ||
} |
6 changes: 6 additions & 0 deletions
6
samples/07.advanced-web-chat-apps/e.soo-on-behalf-of-authentication/.dockerignore
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,6 @@ | ||
/app/build | ||
/app/node_modules | ||
/bot/.env | ||
/bot/node_modules | ||
/rest-api/.env | ||
/rest-api/node_modules |
47 changes: 47 additions & 0 deletions
47
samples/07.advanced-web-chat-apps/e.soo-on-behalf-of-authentication/Dockerfile
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,47 @@ | ||
# This container is for simplifying CI when using Azure Pipelines | ||
|
||
# The first builder image will build HTML and JavaScript code out of the create-react-app project | ||
FROM node:12 AS builder-react | ||
WORKDIR /var/build/react/ | ||
|
||
# Copy the web app code to /var/build/react/ | ||
# We excluded /.env and /node_modules/ via .dockerignore | ||
ADD app/ /var/build/react/ | ||
|
||
# Doing a fresh "npm install" on build to make sure the image is reproducible | ||
RUN npm ci | ||
|
||
# Build the web app code via create-react-app and react-scripts | ||
RUN npm run build | ||
|
||
# The second builder image will aggregate all code into a single Docker image for export | ||
FROM node:12 | ||
|
||
# Copy the bot code to /var/bot/ | ||
ADD bot/ /var/build/bot/ | ||
|
||
# Copy the web server code to /var/web/ | ||
ADD rest-api/ /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/ | ||
|
||
# Copy static React app to /var/web/public/, to be consumed by web server | ||
COPY --from=builder-react /var/build/react/build/ /var/build/web/public/ | ||
|
||
# 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 * |
28 changes: 28 additions & 0 deletions
28
samples/07.advanced-web-chat-apps/e.soo-on-behalf-of-authentication/Dockerfile-run
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 AS builder-web | ||
|
||
# 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 |
274 changes: 274 additions & 0 deletions
274
samples/07.advanced-web-chat-apps/e.soo-on-behalf-of-authentication/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
samples/07.advanced-web-chat-apps/e.soo-on-behalf-of-authentication/app/.env
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 @@ | ||
SKIP_PREFLIGHT_CHECK=true |
23 changes: 23 additions & 0 deletions
23
samples/07.advanced-web-chat-apps/e.soo-on-behalf-of-authentication/app/.gitignore
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,23 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
Oops, something went wrong.