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 WORKDIR /App
COPY --from=build-env /App/out . COPY --from=build-env /App/out .
EXPOSE 8080 EXPOSE 8080
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8
CMD ["./CarCareTracker"] 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-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 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> </div>
@if (enableCsvImports) @if (enableCsvImports)
{ {
@@ -66,8 +66,8 @@
<td class="col-2">@gasRecord.Mileage</td> <td class="col-2">@gasRecord.Mileage</td>
<td class="col-2">@gasRecord.Gallons.ToString("F")</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-4">@(gasRecord.MilesPerGallon == 0 ? "---" : gasRecord.MilesPerGallon.ToString("F"))</td>
<td class="col-1">@gasRecord.Cost.ToString("C")</td> <td class="col-1">@gasRecord.Cost.ToString("C3")</td>
<td class="col-1">@gasRecord.CostPerGallon.ToString("C")</td> <td class="col-1">@gasRecord.CostPerGallon.ToString("C3")</td>
</tr> </tr>
} }
</tbody> </tbody>

View File

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

View File

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