Skip to content

Commit

Permalink
Merge pull request #59 from qJake/project-updates
Browse files Browse the repository at this point in the history
Dockerfile updates
  • Loading branch information
qJake authored Feb 8, 2020
2 parents c7f453f + 866d9fc commit 7775164
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Docker/BuildHaccContainers.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$version = '1.0.0'
$version = '1.0.1'

function Test-ExitCode ([int] $Expected = 0)
{
Expand Down
16 changes: 16 additions & 0 deletions Docker/linux-alpine-amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,19 @@ ENV HACC_VERSION $TAG
EXPOSE 8095

ENTRYPOINT ["dotnet", "HADotNet.CommandCenter.dll"]

# Labels
LABEL \
io.hass.name="HACC" \
io.hass.description="Wall-mountable tablet interface for Home Assistant." \
io.hass.arch="amd64" \
io.hass.type="addon" \
io.hass.version=${HACC_VERSION} \
maintainer="qJake <https://github.com/qJake/>" \
org.label-schema.description="Wall-mountable tablet interface for Home Assistant." \
org.label-schema.name="HACC" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.usage="https://github.com/qJake/HADotNet.CommandCenter/README.md" \
org.label-schema.vcs-url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.vendor="qJake"
16 changes: 16 additions & 0 deletions Docker/linux-debian-amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,19 @@ ENV HACC_VERSION $TAG
EXPOSE 8095

ENTRYPOINT ["dotnet", "HADotNet.CommandCenter.dll"]

# Labels
LABEL \
io.hass.name="HACC" \
io.hass.description="Wall-mountable tablet interface for Home Assistant." \
io.hass.arch="amd64" \
io.hass.type="addon" \
io.hass.version=${HACC_VERSION} \
maintainer="qJake <https://github.com/qJake/>" \
org.label-schema.description="Wall-mountable tablet interface for Home Assistant." \
org.label-schema.name="HACC" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.usage="https://github.com/qJake/HADotNet.CommandCenter/README.md" \
org.label-schema.vcs-url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.vendor="qJake"
13 changes: 3 additions & 10 deletions Docker/linux-debian-arm32v7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,18 @@ WORKDIR /app

CMD ["dotnet", "HADotNet.CommandCenter.dll"]

# Build arguments
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION

# Labels
LABEL \
io.hass.name="HACC" \
io.hass.description="Wall-mountable tablet interface for Home Assistant." \
io.hass.arch="armv7|armhf|i386|amd64" \
io.hass.arch="armhf" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
io.hass.version=${HACC_VERSION} \
maintainer="qJake <https://github.com/qJake/>" \
org.label-schema.description="Wall-mountable tablet interface for Home Assistant." \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="HACC" \
org.label-schema.schema-version="$TAG" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.usage="https://github.com/qJake/HADotNet.CommandCenter/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.vendor="qJake"
16 changes: 16 additions & 0 deletions Docker/linux-debian-arm64v8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,19 @@ ENV HACC_VERSION $TAG
EXPOSE 8095

ENTRYPOINT ["dotnet", "HADotNet.CommandCenter.dll"]

# Labels
LABEL \
io.hass.name="HACC" \
io.hass.description="Wall-mountable tablet interface for Home Assistant." \
io.hass.arch="aarch64" \
io.hass.type="addon" \
io.hass.version=${HACC_VERSION} \
maintainer="qJake <https://github.com/qJake/>" \
org.label-schema.description="Wall-mountable tablet interface for Home Assistant." \
org.label-schema.name="HACC" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.usage="https://github.com/qJake/HADotNet.CommandCenter/README.md" \
org.label-schema.vcs-url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.vendor="qJake"
18 changes: 18 additions & 0 deletions Docker/linux-ubuntu-amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,21 @@ ENV HACC_VERSION $TAG
EXPOSE 8095

ENTRYPOINT ["dotnet", "HADotNet.CommandCenter.dll"]

# Labels
LABEL \
io.hass.name="HACC" \
io.hass.description="Wall-mountable tablet interface for Home Assistant." \
io.hass.arch="amd64" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="qJake <https://github.com/qJake/>" \
org.label-schema.description="Wall-mountable tablet interface for Home Assistant." \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="HACC" \
org.label-schema.schema-version="$TAG" \
org.label-schema.url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.usage="https://github.com/qJake/HADotNet.CommandCenter/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://github.com/qJake/HADotNet.CommandCenter/" \
org.label-schema.vendor="qJake"
4 changes: 2 additions & 2 deletions HADotNet.CommandCenter/HADotNet.CommandCenter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<RuntimeIdentifiers>win10;alpine.3.10-x64;debian.10-arm</RuntimeIdentifiers>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<AssemblyVersion>1.0.1.0</AssemblyVersion>
<FileVersion>1.0.1.0</FileVersion>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Deterministic>false</Deterministic>
Expand Down
2 changes: 2 additions & 0 deletions HADotNet.CommandCenter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(wb =>
{
wb.ConfigureKestrel(k => k.AddServerHeader = false);
wb.CaptureStartupErrors(true);
wb.UseStartup<Startup>();
});
}
Expand Down
9 changes: 8 additions & 1 deletion HADotNet.CommandCenter/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ public void ConfigureServices(IServiceCollection services)
services.AddSignalR()
.AddNewtonsoftJsonProtocol();

services.AddControllersWithViews().AddRazorRuntimeCompilation();
if (Environment.IsDevelopment())
{
services.AddControllersWithViews().AddRazorRuntimeCompilation();
}
else
{
services.AddControllersWithViews();
}

services.AddMvc()
.AddNewtonsoftJson();
Expand Down

0 comments on commit 7775164

Please sign in to comment.