Skip to content

Commit e978100

Browse files
committed
Merge branch 'main' into java-semantic-kernel-integration
2 parents 09b3c1f + f9491f4 commit e978100

File tree

3 files changed

+9
-30
lines changed

3 files changed

+9
-30
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,7 @@ Here are the most common failure scenarios and solutions:
133133

134134
1. After running `azd up` and visiting the website, you see a '404 Not Found' in the browser. Wait 10 minutes and try again, as it might be still starting up. Then try running `azd deploy` and wait again. If you still encounter errors with the deployed app, consult these [tips for debugging Flask app deployments](http://blog.pamelafox.org/2023/06/tips-for-debugging-flask-deployments-to.html)
135135
and file an issue if the error logs don't help you resolve the issue.
136+
137+
1. After running `./app/start.ps1` on windows power shell you get `The file C:\path\to\azure-search-openai-demo-java\app\start.ps1 is not digitally signed. You cannot run this script on the current system`. Try to run `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass` and try to re-run `./app/start.ps1`
138+
139+
1. After running `./app/start.ps1` or `./app/start.sh` you get `Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project myproject: Fatal error compiling: invalid target release: 17` it means you are not using JDK 17 but a previous versions. Be sure to set `JAVA_HOME` env variable to your java 17 installation directory and update your 'PATH' env variable to have java 17 bin folder as first occurence in the executables directories. more info [here](https://learn.microsoft.com/en-us/java/openjdk/install)

app/start.ps1

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,10 @@ if ($LASTEXITCODE -ne 0) {
1616
}
1717

1818

19-
Write-Host 'Creating python virtual environment "backend/backend_env"'
20-
$pythonCmd = Get-Command python -ErrorAction SilentlyContinue
21-
if (-not $pythonCmd) {
22-
# fallback to python3 if python not found
23-
$pythonCmd = Get-Command python3 -ErrorAction SilentlyContinue
24-
}
25-
Start-Process -FilePath ($pythonCmd).Source -ArgumentList "-m venv ./backend/backend_env" -Wait -NoNewWindow
26-
27-
Write-Host ""
28-
Write-Host "Restoring backend python packages"
29-
Write-Host ""
30-
31-
Set-Location backend
32-
$venvPythonPath = "./backend_env/scripts/python.exe"
33-
if (Test-Path -Path "/usr") {
34-
# fallback to Linux venv path
35-
$venvPythonPath = "./backend_env/bin/python"
36-
}
37-
38-
Start-Process -FilePath $venvPythonPath -ArgumentList "-m pip install -r requirements.txt" -Wait -NoNewWindow
39-
if ($LASTEXITCODE -ne 0) {
40-
Write-Host "Failed to restore backend python packages"
41-
exit $LASTEXITCODE
42-
}
43-
4419
Write-Host ""
4520
Write-Host "Restoring frontend npm packages"
4621
Write-Host ""
47-
Set-Location ../frontend
22+
Set-Location ./frontend
4823
npm install
4924
if ($LASTEXITCODE -ne 0) {
5025
Write-Host "Failed to restore frontend npm packages"
@@ -61,12 +36,12 @@ if ($LASTEXITCODE -ne 0) {
6136
}
6237

6338
Write-Host ""
64-
Write-Host "Starting backend"
39+
Write-Host "Starting spring boot api backend and react spa from backend/public static content"
6540
Write-Host ""
6641
Set-Location ../backend
67-
Start-Process http://127.0.0.1:5000
42+
Start-Process http://localhost:8080
6843

69-
Start-Process -FilePath $venvPythonPath -ArgumentList "./app.py" -Wait -NoNewWindow
44+
Start-Process -FilePath "./mvnw.cmd" -ArgumentList "spring-boot:run -Dspring-boot.run.profiles=dev" -Wait -NoNewWindow
7045

7146
if ($LASTEXITCODE -ne 0) {
7247
Write-Host "Failed to start backend"

app/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ echo "Spring-boot application.properties use values from azd .env file which hav
4444
echo ""
4545

4646
cd ../backend
47-
xdg-open http://localhost:8080
47+
#xdg-open http://localhost:8080
4848
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
4949
if [ $? -ne 0 ]; then
5050
echo "Failed to start backend"

0 commit comments

Comments
 (0)