feat(deploy): add heimdall-web Blazor UI service to Docker Compose
The Dockerfile.central already compiled Heimdall.Web but it was never deployed as a service. Add heimdall-web service using the same image with entrypoint overridden to dotnet web/Heimdall.Web.dll. - Expose port 5001 for the Blazor Server UI - API_BASE_URL points to heimdall-central:8080 for server-side HTTP calls - Healthcheck on root / returns 200 once the Blazor circuit is ready
This commit is contained in:
1 parent
fdfd506977
commit
f5c4bcd5f0
3 files changed
+50
-1
No files matched your search
@@ -13,6 +13,7 @@ COPY src/Heimdall.Web/*.csproj src/Heimdall.Web/
|
||||
COPY src/Heimdall.Workers/*.csproj src/Heimdall.Workers/
|
||||
|
||||
RUN dotnet restore src/Heimdall.Api/Heimdall.Api.csproj
|
||||
RUN dotnet restore src/Heimdall.Web/Heimdall.Web.csproj
|
||||
RUN dotnet restore src/Heimdall.Workers/Heimdall.Workers.csproj
|
||||
|
||||
# Copy all source
|
||||
|
||||
@@ -108,8 +108,31 @@ services:
|
||||
networks:
|
||||
- heimdall-net
|
||||
|
||||
heimdall-web:
|
||||
image: eltruncho/heimdall-central:latest
|
||||
entrypoint: ["dotnet", "web/Heimdall.Web.dll"]
|
||||
environment:
|
||||
ASPNETCORE_URLS: http://+:8080
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
|
||||
API_BASE_URL: ${HEIMDALL_CENTRAL_URL:-http://heimdall-central:8080}
|
||||
SENTRY_DSN: ${SENTRY_DSN}
|
||||
ports:
|
||||
- "${WEB_PORT:-5001}:8080"
|
||||
depends_on:
|
||||
- heimdall-central
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
restart: unless-stopped
|
||||
logging: *default-logging
|
||||
networks:
|
||||
- heimdall-net
|
||||
|
||||
heimdall-agent:
|
||||
image: eltruncho/heimdall-agent:latest
|
||||
image: eltruncho/heimdall-central:latest
|
||||
environment:
|
||||
HEIMDALL_CENTRAL_URL: ${HEIMDALL_CENTRAL_URL:-http://heimdall-central:8080}
|
||||
HEIMDALL_SITE_TOKEN: ${HEIMDALL_SITE_TOKEN}
|
||||
|
||||
@@ -107,6 +107,31 @@ services:
|
||||
networks:
|
||||
- heimdall-net
|
||||
|
||||
heimdall-web:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile.central
|
||||
entrypoint: ["dotnet", "web/Heimdall.Web.dll"]
|
||||
environment:
|
||||
ASPNETCORE_URLS: http://+:8080
|
||||
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
|
||||
API_BASE_URL: ${HEIMDALL_CENTRAL_URL:-http://heimdall-central:8080}
|
||||
SENTRY_DSN: ${SENTRY_DSN}
|
||||
ports:
|
||||
- "${WEB_PORT:-5001}:8080"
|
||||
depends_on:
|
||||
- heimdall-central
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
restart: unless-stopped
|
||||
logging: *default-logging
|
||||
networks:
|
||||
- heimdall-net
|
||||
|
||||
heimdall-agent:
|
||||
build:
|
||||
context: ..
|
||||
|
||||
Reference in new issue
Block a user