Skip to content

Commit

Permalink
Merge pull request #78 from dyatlov-a/hotfix-266
Browse files Browse the repository at this point in the history
Fixed run migrations
  • Loading branch information
dyatlov-a authored Sep 17, 2024
2 parents 9704c61 + 1450758 commit e7abeb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ public sealed class Build : NukeBuild
.SetProcessWorkingDirectory(RootDirectory)
.SetPath(".")
.SetFile("cicd/dockerfile.migrations_runner")
.SetBuildArg($"PROJECT={MigrationRunnerProject}")
.SetTag(GetImageName(MigrationRunnerProject)));
});

Expand Down
7 changes: 2 additions & 5 deletions cicd/dockerfile.migrations_runner
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-amd64

ARG PROJECT

# VARS
ENV APP_DIR="/migrations" \
APP_DLL="${PROJECT}.dll" \
APP_USER=teamassist_migrations

# create app user and ko
Expand All @@ -14,7 +11,7 @@ RUN mkdir -p ${APP_DIR} \
&& chmod 700 ${APP_DIR}

# copy already builded project
COPY --chown=${APP_USER}:${APP_USER} ./output/${PROJECT} ${APP_DIR}
COPY --chown=${APP_USER}:${APP_USER} ./output/Inc.TeamAssistant.MigrationsRunner ${APP_DIR}
WORKDIR ${APP_DIR}

# post install commands
Expand All @@ -24,4 +21,4 @@ RUN rm -f *.sh \
# Run app as non root user
USER ${APP_USER}

ENTRYPOINT ["dotnet", ${APP_DLL}]
ENTRYPOINT ["dotnet", "Inc.TeamAssistant.MigrationsRunner.dll"]

0 comments on commit e7abeb6

Please sign in to comment.