Skip to content

Commit

Permalink
Merge pull request #39 from neozhu/bufix/cicd
Browse files Browse the repository at this point in the history
fix ci/cd build docker image
  • Loading branch information
neozhu authored Jan 8, 2025
2 parents e87ebed + 8e4804c commit cbe2c7e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ jobs:

- name: Build and push CleanAspire.Standalone image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/cleanaspire-standalone:${{ steps.version.outputs.version }} -f src/CleanAspire.ClientApp/Dockerfile .
docker push ${{ secrets.DOCKER_USERNAME }}/cleanaspire-standalone:${{ steps.version.outputs.version }}
docker build -t ${{ secrets.DOCKER_USERNAME }}/cleanaspire-standalone:${{ steps.version.outputs.version }} -f src/CleanAspire.ClientApp/Dockerfile .
docker push ${{ secrets.DOCKER_USERNAME }}/cleanaspire-standalone:${{ steps.version.outputs.version }}
- name: Build and push CleanAspire.WebApp image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/cleanaspire-webapp:${{ steps.version.outputs.version }} -f src/CleanAspire.WebApp/Dockerfile .
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,17 @@ https://github.com/neozhu/cleanaspire/issues/34
### OpenAPI documentation
- https://apiservice.blazorserver.com/scalar/v1

### Blazor WebAssembly Standalone PWA
- https://standalone.blazorserver.com/


### Here is an example of a docker-compose.yml file for a local Docker deployment:

```yml
version: '3.8'
services:
apiservice:
image: blazordevlab/cleanaspire-api:0.0.62
image: blazordevlab/cleanaspire-api:0.0.64
environment:
- ASPNETCORE_ENVIRONMENT=Development
- AllowedHosts=*
Expand All @@ -111,7 +114,7 @@ services:
- "8018:443"

blazorweb:
image: blazordevlab/cleanaspire-webapp:0.0.62
image: blazordevlab/cleanaspire-webapp:0.0.64
environment:
- ASPNETCORE_ENVIRONMENT=Production
- AllowedHosts=*
Expand All @@ -123,7 +126,7 @@ services:
- "8014:443"

standalone:
image: blazordevlab/cleanaspire-standalone:0.0.62
image: blazordevlab/cleanaspire-standalone:0.0.64
ports:
- "8020:80"
- "8021:443"
Expand Down
2 changes: 1 addition & 1 deletion src/CleanAspire.Api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN dotnet restore "src/CleanAspire.Api/CleanAspire.Api.csproj"

COPY . .
WORKDIR /src/src/CleanAspire.Api
RUN dotnet publish -c Release -o /app/publish
RUN dotnet publish "./CleanAspire.Api.csproj" -c Release -o /app/publish

# Stage 2: Create the runtime image
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
Expand Down
2 changes: 1 addition & 1 deletion src/CleanAspire.ClientApp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN dotnet workload update

# Copy the entire source code and build the application in Release mode
COPY . .
RUN dotnet publish -c Release -o /app/publish -p:DefineConstants=STANDALONE
RUN dotnet publish "src/CleanAspire.ClientApp/CleanAspire.ClientApp.csproj" -c Release -o /app/publish -p:DefineConstants=STANDALONE

# Stage 2: Serve the Blazor Client Application using Nginx
FROM nginx:alpine AS final
Expand Down
2 changes: 1 addition & 1 deletion src/CleanAspire.ClientApp/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"ClientAppSettings": {
"AppName": "Blazor Aspire",
"Version": "v0.0.62",
"Version": "v0.0.64",
"ServiceBaseUrl": "https://apiservice.blazorserver.com"
}
}
2 changes: 1 addition & 1 deletion src/CleanAspire.WebApp/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"AllowedHosts": "*",
"ClientAppSettings": {
"AppName": "Blazor Aspire",
"Version": "v0.0.62",
"Version": "v0.0.64",
"ServiceBaseUrl": "https://apiservice.blazorserver.com"
}
}

0 comments on commit cbe2c7e

Please sign in to comment.