-
Notifications
You must be signed in to change notification settings - Fork 43
/
azure.yaml
40 lines (39 loc) · 1.47 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
35
36
37
38
39
40
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
name: todo-nodejs-mongo
metadata:
template: [email protected]
workflows:
up:
steps:
- azd: provision
- azd: deploy --all
services:
web:
project: ./src/web
dist: dist
language: js
host: appservice
hooks:
# Creates a temporary `.env.local` file for the build command. Vite will automatically use it during build.
# The expected/required values are mapped to the infrastructure outputs.
# .env.local is ignored by git, so it will not be committed if, for any reason, if deployment fails.
# see: https://vitejs.dev/guide/env-and-mode
# Note: Notice that dotenv must be a project dependency for this to work. See package.json.
prepackage:
windows:
shell: pwsh
run: 'echo "VITE_API_BASE_URL=""$env:API_BASE_URL""" > .env.local ; echo "VITE_APPLICATIONINSIGHTS_CONNECTION_STRING=""$env:APPLICATIONINSIGHTS_CONNECTION_STRING""" >> .env.local'
posix:
shell: sh
run: 'echo VITE_API_BASE_URL=\"$API_BASE_URL\" > .env.local && echo VITE_APPLICATIONINSIGHTS_CONNECTION_STRING=\"$APPLICATIONINSIGHTS_CONNECTION_STRING\" >> .env.local'
postdeploy:
windows:
shell: pwsh
run: 'rm .env.local'
posix:
shell: sh
run: 'rm .env.local'
api:
project: ./src/api
language: js
host: appservice