Skip to content

Commit

Permalink
Merge pull request #21 from Star-Academy/revert-20-docker-migration
Browse files Browse the repository at this point in the history
Revert "feat: Bundled migration"
  • Loading branch information
Alirezaja1384 authored Aug 24, 2024
2 parents 9fceb51 + 9f468a1 commit d2b88ac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 39 deletions.
12 changes: 3 additions & 9 deletions mohaymen-codestar-Team02/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build

WORKDIR /app

ENV PATH="${PATH}:/root/.dotnet/tools"
RUN dotnet tool install --global dotnet-ef

COPY *.csproj .
RUN dotnet restore

COPY . .
RUN dotnet build -c Release
RUN dotnet ef migrations bundle --no-build -o dbmigrate
RUN dotnet publish -c Release -o output --no-build
RUN dotnet publish -c Release -o output
# </Build>

# <Run>
Expand All @@ -24,10 +19,9 @@ USER app

WORKDIR /app

COPY --chown=app:app --from=build /app/output /app/dbmigrate /app/
COPY --chown=app:app ./entrypoint.sh /app/entrypoint.sh
COPY --chown=app:app --from=build /app/output .

ENTRYPOINT ["bash", "/app/entrypoint.sh"]
ENTRYPOINT ["dotnet", "mohaymen-codestar-Team02.dll"]

EXPOSE 8080

Expand Down
12 changes: 12 additions & 0 deletions mohaymen-codestar-Team02/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"AppSettings": {
"Token": "my top secret key is right here hehe jkjkjkj yguguygugyuguyguuygggyuguyuygu jhj"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
29 changes: 0 additions & 29 deletions mohaymen-codestar-Team02/entrypoint.sh

This file was deleted.

2 changes: 1 addition & 1 deletion mohaymen-codestar-Team02/prod.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ASPNETCORE_ENVIRONMENT=Release
CONNECTION_STRING="Host=postgres;Port=5432;Database=mohaymen_group02_project;Username=pguser;Password=pgpass;"
ConnectionStrings__DefaultConnection="Host=postgres;Port=5432;Database=mohaymen_group02_project;Username=pguser;Password=pgpass;"

0 comments on commit d2b88ac

Please sign in to comment.