Skip to content

Commit

Permalink
feat: split migrate and app images
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Oct 25, 2023
1 parent 8df1e64 commit ebcf6cb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
dockerfile: ./infra/Dockerfile
context: .
platform: linux/amd64
- image-name: migrate-amd
dockerfile: ./infra/migrate.Dockerfile
context: .
platform: linux/amd64
env:
STRAT_DOCKER_IMAGE: ${{ matrix.configs.image-name }}
STRAT_DOCKERFILE: ${{ matrix.configs.dockerfile }}
Expand Down
2 changes: 1 addition & 1 deletion config/tilt/prod.Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def start(landscape, platform, service, port, live):
docker_build(
migration_image_name,
'.',
dockerfile = './infra/Dockerfile',
dockerfile = './infra/migrate.Dockerfile',
)

# Add Link
Expand Down
9 changes: 9 additions & 0 deletions infra/migrate.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine
WORKDIR /app
COPY ["App/App.csproj", "App/"]
RUN dotnet restore "App/App.csproj"
COPY . .
WORKDIR /app
RUN dotnet tool install --global dotnet-ef
ENV PATH="$PATH:/root/.dotnet/tools"
CMD [ "dotnet-ef", "database", "update", "--project", "./App" ]
2 changes: 1 addition & 1 deletion infra/root_chart/values.pichu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ migration:
securityContext: *securityContext
podSecurityContext: *podSecurityContext
image:
repository: ghcr.io/atomicloud/sulfone.zinc/api-amd
repository: ghcr.io/atomicloud/sulfone.zinc/migrate-amd
serviceTree:
landscape: *landscape

Expand Down
2 changes: 1 addition & 1 deletion infra/root_chart/values.pikachu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ migration:
securityContext: *securityContext
podSecurityContext: *podSecurityContext
image:
repository: ghcr.io/atomicloud/sulfone.zinc/api-amd
repository: ghcr.io/atomicloud/sulfone.zinc/migrate-amd
serviceTree:
landscape: *landscape

Expand Down
2 changes: 1 addition & 1 deletion infra/root_chart/values.raichu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ migration:
securityContext: *securityContext
podSecurityContext: *podSecurityContext
image:
repository: ghcr.io/atomicloud/sulfone.zinc/api-amd
repository: ghcr.io/atomicloud/sulfone.zinc/migrate-amd
serviceTree:
landscape: *landscape

Expand Down

0 comments on commit ebcf6cb

Please sign in to comment.