Skip to content

Commit

Permalink
feat: Updating docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
leandro-cervelin committed Jan 13, 2024
1 parent d95affa commit 591004b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 29 deletions.
7 changes: 2 additions & 5 deletions src/CF.Api/CF.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CF.Customer.Infrastructure\CF.Customer.Infrastructure.csproj" />
<ProjectReference Include="..\CF.Migrations\CF.Migrations.csproj" />
<ProjectReference Include="..\CF.Customer.Infrastructure\CF.Customer.Infrastructure.csproj" />
<ProjectReference Include="..\CF.Migrations\CF.Migrations.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="Dockerfile">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="entrypoint.sh">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
5 changes: 1 addition & 4 deletions src/CF.Api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,4 @@ RUN dotnet publish "CF.Api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "CF.Api.dll"]

RUN chmod +x ./entrypoint.sh
CMD /bin/bash ./entrypoint.sh
ENTRYPOINT ["dotnet", "CF.Api.dll"]
1 change: 0 additions & 1 deletion src/CF.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ void AddExceptionHandler()

void AddSwagger()
{
if (!app.Environment.IsDevelopment()) return;
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "CF Api"));
}
Expand Down
2 changes: 0 additions & 2 deletions src/CF.Api/create-database.sql

This file was deleted.

4 changes: 3 additions & 1 deletion src/CF.Api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
version: "3"
version: "3.4"
services:
api:
build:
context: ..
dockerfile: CF.Api/Dockerfile
ports:
- "8888:80"
environment:
- ASPNETCORE_URLS=http://+:80
depends_on:
- db
db:
Expand Down
16 changes: 0 additions & 16 deletions src/CF.Api/entrypoint.sh

This file was deleted.

0 comments on commit 591004b

Please sign in to comment.