forked from Azure-Samples/msdocs-tomcat-mysql-sample-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure.yaml
34 lines (33 loc) · 1.42 KB
/
azure.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
# azure.yaml is an azd configuration file and isn't used by the sample application.
name: tomcat-app-service-mysql-redis-infra
metadata:
template: tomcat-app-service-mysql-redis-infra@0.0.1-beta
services:
web:
project: .
language: java
host: appservice
hooks:
postprovision:
posix:
shell: sh
run: printf '\nApp Service app has the following connection strings:\n' && printf "$CONNECTION_SETTINGS" | jq -r '.[]' | sed 's/\(.*\)/\t- \1/' && printf "\nSee the settings in the portal:\033[1;36m $WEB_APP_CONFIG\n"
interactive: true
continueOnError: true
windows:
shell: pwsh
run: Write-Host "`n`nApp Service app has the following connection strings:`n" $CONNECTION_SETTINGS | ConvertFrom-Json | ForEach-Object { Write-Host "\t- $_" }
interactive: true
continueOnError: true
postdeploy:
posix:
shell: sh
run: printf "Open SSH session to App Service container at:\033[1;36m $WEB_APP_SSH\033[0m\nStream App Service logs at:\033[1;36m $WEB_APP_LOG_STREAM\n"
interactive: true
continueOnError: true
windows:
shell: pwsh
run: Write-Host "`n`nOpen SSH session to App Service container at:`n" $WEB_APP_SSH; Write-Host "Stream App Service logs at:`n" $WEB_APP_LOG_STREAM
interactive: true
continueOnError: true