File tree Expand file tree Collapse file tree 6 files changed +89
-2
lines changed
Expand file tree Collapse file tree 6 files changed +89
-2
lines changed Original file line number Diff line number Diff line change 1+ .venv
2+ Dockerfile
3+ .git
4+ .vscode
5+ .github
6+ __pycache__
7+ * .pyc
8+ * .pyo
9+ * .pyd
10+ dist
Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on :
4+ push :
5+ branches : [ "main", "feature/deployment" ] # TODO leave only main
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ deploy :
12+ environment : website-prod
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Azure login
19+ uses : azure/login@v2
20+ with :
21+ creds : ${{ secrets.AZURE_CREDENTIALS }}
22+
23+ - name : Install Azure CLI
24+ uses : pietrobolcato/install-azure-cli-action@main
25+
26+ - name : Run Deploy.ps1
27+ shell : pwsh
28+ run : ./Deploy.ps1 `
29+ -resourceGroupName ${{ secrets.AZURE_RESOURCE_GROUP }} `
30+ -appName ${{ secrets.AZURE_APP_NAME }} `
31+ -acrName ${{ secrets.AZURE_ACR_NAME }}
Original file line number Diff line number Diff line change 1+ param (
2+ [Parameter (Mandatory )]
3+ [string ] $resourceGroupName ,
4+
5+ [Parameter (Mandatory )]
6+ [string ] $appName ,
7+
8+ [Parameter (Mandatory )]
9+ [string ] $acrName
10+ )
11+
12+ $imageName = " uipath-dev-python:$ ( Get-Date - Format ' yyyyMMddHHmmss' ) "
13+ $acrImageName = " $ ( $acrName ) .azurecr.io/$ ( $imageName ) "
14+
15+ az acr login -- name $acrName
16+
17+ docker build - t $imageName $PSScriptRoot
18+ docker tag $imageName $acrImageName
19+ docker push $acrImageName
20+
21+ az webapp config container set `
22+ -- resource- group $resourceGroupName `
23+ -- name $appName `
24+ -- container- image- name $acrImageName
25+
26+ az webapp restart `
27+ -- resource- group $resourceGroupName `
28+ -- name $appName
Original file line number Diff line number Diff line change 1+ FROM python:3.11.14-bookworm
2+
3+ WORKDIR /app
4+
5+ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
6+ COPY . /app/
7+
8+ RUN chmod +x start.sh
9+
10+ ENV UIPATH_DEV_SERVER_PORT=80
11+ ENV UIPATH_DEV_SERVER_HOST=0.0.0.0
12+
13+ CMD ["/bin/sh" , "/app/start.sh" ]
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ def __init__(
5252 self ,
5353 runtime_factory : UiPathRuntimeFactoryProtocol ,
5454 trace_manager : UiPathTraceManager ,
55- host : str = " localhost" ,
56- port : int = 8000 ,
55+ host : str = os . environ . get ( 'UIPATH_DEV_SERVER_HOST' , ' localhost' ) ,
56+ port : int = int ( os . environ . get ( 'UIPATH_DEV_SERVER_PORT' , '8080' )) ,
5757 open_browser : bool = True ,
5858 factory_creator : Callable [[], UiPathRuntimeFactoryProtocol ] | None = None ,
5959 ) -> None :
Original file line number Diff line number Diff line change 1+ # !/bin/sh
2+ /root/.local/bin/uv venv --clear
3+ . ./.venv/bin/activate
4+ /root/.local/bin/uv sync
5+ /root/.local/bin/uv run uipath-dev-server
You can’t perform that action at this time.
0 commit comments