Fixed execute permission on service run file. Added healthcheck to Dockerfile and docker-compose file. Updated scripts for addtional functionality
This commit is contained in:
parent
c4ff8acbc0
commit
311ba78b88
5 changed files with 32 additions and 7 deletions
|
|
@ -85,6 +85,7 @@ RUN \
|
||||||
|
|
||||||
ENV PATH "$PATH:/usr/share/dotnet"
|
ENV PATH "$PATH:/usr/share/dotnet"
|
||||||
|
|
||||||
|
# Copy files for app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=dotnet-build-env /appserver/server/out .
|
COPY --from=dotnet-build-env /appserver/server/out .
|
||||||
COPY --from=node-build-env /appclient/client/out ./wwwroot
|
COPY --from=node-build-env /appclient/client/out ./wwwroot
|
||||||
|
|
@ -93,3 +94,6 @@ COPY --from=node-build-env /appclient/root/ /
|
||||||
# ports and volumes
|
# ports and volumes
|
||||||
EXPOSE 6500
|
EXPOSE 6500
|
||||||
VOLUME ["/config", "/data" ]
|
VOLUME ["/config", "/data" ]
|
||||||
|
|
||||||
|
# Check Status
|
||||||
|
HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 CMD curl --fail http://localhost:6500 || exit
|
||||||
|
|
@ -17,7 +17,7 @@ Write-Host "removing Container (if exists)"
|
||||||
docker rm rdtclientdev
|
docker rm rdtclientdev
|
||||||
|
|
||||||
Write-Host "Building Container"
|
Write-Host "Building Container"
|
||||||
$dockerArgs = @( "build", "--force-rm", "--tag", "rdtclientdev", "--progress=$BuildProgress", "." )
|
$dockerArgs = @( "build", "--force-rm", "--network host", "--tag", "rdtclientdev", "--progress=$BuildProgress", "." )
|
||||||
if ($IgnoreBuildCache.IsPresent) { $dockerArgs += @("--no-cace" ) }
|
if ($IgnoreBuildCache.IsPresent) { $dockerArgs += @("--no-cace" ) }
|
||||||
& docker $dockerArgs
|
& docker $dockerArgs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ services:
|
||||||
rdtclient:
|
rdtclient:
|
||||||
image: rogerfar/rdtclient
|
image: rogerfar/rdtclient
|
||||||
container_name: rdtclient
|
container_name: rdtclient
|
||||||
build:
|
# build:
|
||||||
context: .
|
# context: .
|
||||||
dockerfile: Dockerfile
|
# dockerfile: Dockerfile
|
||||||
environment:
|
environment:
|
||||||
- PUID=1001
|
- PUID=1001
|
||||||
- PGID=1001
|
- PGID=1001
|
||||||
|
|
@ -20,3 +20,9 @@ services:
|
||||||
max-size: 10m
|
max-size: 10m
|
||||||
ports:
|
ports:
|
||||||
- '6500:6500'
|
- '6500:6500'
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail http://localhost:6500 || exit 1
|
||||||
|
interval: 30s
|
||||||
|
retries: 3
|
||||||
|
start_period: 30s
|
||||||
|
timeout: 30s
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/pwsh
|
#!/usr/bin/env pwsh
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Helper script to execute docker buildx
|
Helper script to execute docker buildx
|
||||||
|
|
@ -34,12 +34,27 @@
|
||||||
param(
|
param(
|
||||||
[string]$Version = "",
|
[string]$Version = "",
|
||||||
[string]$DockerAccount = "rogerfar",
|
[string]$DockerAccount = "rogerfar",
|
||||||
[string]$Platforms = "linux/arm/v7,linux/arm64/v8,linux/amd64"
|
[string]$Platforms = "linux/arm/v7,linux/arm64/v8,linux/amd64",
|
||||||
|
[switch]$SkipPush,
|
||||||
|
[switch]$SkipCache,
|
||||||
|
[switch]$OutputToDocker
|
||||||
)
|
)
|
||||||
|
|
||||||
$imageName = "$($DockerAccount)/rdtclient"
|
$imageName = "$($DockerAccount)/rdtclient"
|
||||||
|
|
||||||
$dockerArgs = @( "buildx", "build", "--no-cache", "--push", "--platform", $Platforms, "--tag", "$($imageName):latest", "." )
|
$dockerArgs = @( "buildx", "build", "--network=default", "--platform", $Platforms, "--tag", "$($imageName):latest", "." )
|
||||||
|
|
||||||
|
if (-Not $SkipPush.IsPresent) {
|
||||||
|
$dockerArgs += @("--push")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-Not $SkipCache.IsPresent) {
|
||||||
|
$dockerArgs += @("--no-cache")
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($OutputToDocker.IsPresent) {
|
||||||
|
$dockerArgs += @("--output=type=docker")
|
||||||
|
}
|
||||||
|
|
||||||
if ([string]::IsNullOrEmpty($Version)) {
|
if ([string]::IsNullOrEmpty($Version)) {
|
||||||
$Version = (Get-Content "package.json" | ConvertFrom-Json).version
|
$Version = (Get-Content "package.json" | ConvertFrom-Json).version
|
||||||
|
|
|
||||||
0
root/etc/s6-overlay/s6-rc.d/svc-rdt-client/run
Normal file → Executable file
0
root/etc/s6-overlay/s6-rc.d/svc-rdt-client/run
Normal file → Executable file
Loading…
Reference in a new issue