Update docker compose file and move env to own file.

This commit is contained in:
DESKTOP-GENO133\IvanPlex 2024-01-07 07:13:06 -07:00
parent 4e5d893850
commit 4e92155f5b
5 changed files with 14 additions and 5 deletions

2
.env Normal file
View File

@ -0,0 +1,2 @@
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

View File

@ -9,6 +9,4 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /App
COPY --from=build-env /App/out .
EXPOSE 8080
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8
CMD ["./CarCareTracker"]

View File

@ -27,7 +27,7 @@
<span class="ms-2 badge bg-primary">@($"Max Fuel Economy: {Model.Max(x => x.MilesPerGallon).ToString("F") ?? "0"}")</span>
}
<span class="ms-2 badge bg-success">@($"Total Fuel Consumed: {Model.Sum(x=>x.Gallons).ToString("F")}")</span>
<span class="ms-2 badge bg-success">@($"Total Cost: {Model.Sum(x => x.Cost).ToString("C")}")</span>
<span class="ms-2 badge bg-success">@($"Total Cost: {Model.Sum(x => x.Cost).ToString("C3")}")</span>
</div>
@if (enableCsvImports)
{
@ -66,8 +66,8 @@
<td class="col-2">@gasRecord.Mileage</td>
<td class="col-2">@gasRecord.Gallons.ToString("F")</td>
<td class="col-4">@(gasRecord.MilesPerGallon == 0 ? "---" : gasRecord.MilesPerGallon.ToString("F"))</td>
<td class="col-1">@gasRecord.Cost.ToString("C")</td>
<td class="col-1">@gasRecord.CostPerGallon.ToString("C")</td>
<td class="col-1">@gasRecord.Cost.ToString("C3")</td>
<td class="col-1">@gasRecord.CostPerGallon.ToString("C3")</td>
</tr>
}
</tbody>

View File

@ -16,6 +16,8 @@ services:
# expose port and/or use serving via traefik
ports:
- 8080:8080
env_file:
- .env
# traefik configurations, including networks can be commented out if not needed
networks:
- traefik-ingress

View File

@ -16,10 +16,17 @@ services:
# expose port and/or use serving via traefik
ports:
- 8080:8080
env_file:
- .env
volumes:
config:
external: true
data:
external: true
documents:
external: true
images:
external: true
log:
external: true