Integrate frontend with docker

This commit is contained in:
femsci 2023-10-21 21:38:47 +02:00
parent fa46b965b5
commit a8173436ff
Signed by: femsci
GPG key ID: 08F7911F0E650C67
5 changed files with 547 additions and 446 deletions

View file

@ -2,3 +2,8 @@ http://localhost {
reverse_proxy /api/* http://sfood_api:80
reverse_proxy http://sfood_ui:80
}
http://localhost:44420 {
header Access-Control-Allow-Origin "*"
reverse_proxy http://sfood_ui:44420
}

View file

@ -29,5 +29,6 @@ services:
ports:
- 80:80
- 443:443
- 44420:44420
volumes:
- ./dev.Caddyfile:/etc/caddy/Caddyfile

View file

@ -8,7 +8,7 @@
<IsPackable>false</IsPackable>
<SpaRoot>sfood\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
<SpaProxyServerUrl>https://localhost:44420</SpaProxyServerUrl>
<SpaProxyServerUrl>http://localhost:44420</SpaProxyServerUrl>
<SpaProxyLaunchCommand>npm start</SpaProxyLaunchCommand>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
@ -41,7 +41,7 @@
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="$(SpaRoot)build\**" />
<DistFiles Include="$(SpaRoot)dist\**" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>wwwroot\%(RecursiveDir)%(FileName)%(Extension)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>

File diff suppressed because it is too large Load diff

View file

@ -4,6 +4,7 @@
"version": "0.0.1",
"type": "module",
"scripts": {
"start": "ionic serve --port 44420 --no-open --external",
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
@ -21,11 +22,13 @@
"@ionic/react-router": "^7.0.0",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"http-proxy-middleware": "^2.0.6",
"ionicons": "^7.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4"
"react-router-dom": "^5.3.4",
"run-script-os": "^1.1.6"
},
"devDependencies": {
"@capacitor/cli": "5.5.0",