3 Commits

Author SHA1 Message Date
af9f89a7f5 add hostname helper
All checks were successful
Gitea Actions Demo / lint (push) Successful in 29s
Gitea Actions Demo / test (push) Successful in 34s
Gitea Actions Demo / release-image (push) Has been skipped
2025-03-25 20:00:37 -05:00
6f84053124 devcontainer: remove /run directory creation 2025-03-25 19:58:51 -05:00
9c55277924 set the application name 2025-03-25 19:57:30 -05:00
2 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,2 @@
ARG VARIANT="3.4.2"
FROM ghcr.io/rails/devcontainer/images/ruby:${VARIANT}
RUN mkdir /run/kubernaut && \
chown vscode: /run/kubernaut

7
app.rb
View File

@@ -25,7 +25,8 @@ SESSION_SECRET_HEX_LENGTH = 64
JWT_SECRET_HEX_LENGTH = 64
DEFAULT_FLAKEY = 50
ENV_PREFIX = "KUBERNAUT"
NAME = "kubernaut".freeze
ENV_PREFIX = NAME.upcase
CLK_TCK = 100
PROC_UPTIME_PATH = "/proc/uptime".freeze
@@ -279,6 +280,10 @@ helpers do
@auth.credentials and
@auth.credentials == ["qwer", "asdf"]
end
def hostname
ENV["HOSTNAME"]
end
end
get "/" do