Skip to content

Commit

Permalink
Bugfixes (#5)
Browse files Browse the repository at this point in the history
* set hostname from data

* timezone

* alignment

* update version
  • Loading branch information
tuxmea committed Aug 4, 2022
1 parent 6ce9be9 commit cb888aa
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
"path": "bash"
}
}
},
Expand Down
27 changes: 18 additions & 9 deletions manifests/docker.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
include docker
}

group { $hdm::group:
ensure => present,
}

user { $hdm::user:
ensure => present,
gid => $hdm::group,
shell => '/sbin/nologin',
}

$directories = [
$hdm::hdm_path,
"${hdm::hdm_path}/certs",
Expand Down Expand Up @@ -41,20 +51,19 @@
}

docker::run { 'hdm':
image => "ghcr.io/betadots/hdm:${hdm::version}",
env => [
"TZ=${facts['timezone']}",
"RAILS_DEVELOPMENT_HOSTS=${facts['networking']['fqdn']}",
image => "ghcr.io/betadots/hdm:${hdm::version}",
env => [
"TZ=${$hdm::timezone}",
"RAILS_DEVELOPMENT_HOSTS=${hdm::hostname}",
],
volumes => [
volumes => [
"${hdm::hdm_path}:${hdm::hdm_path}",
"${hdm::puppet_code_dir}:${hdm::puppet_code_dir}:ro",
"${hdm::hdm_path}/hdm.yml:/hdm/config/hdm.yml:ro",
"${hdm::hdm_path}/database.yml:/hdm/config/database.yml:ro",
],
hostname => $hdm::hostname,
ports => [$hdm::port],
net => 'host',
extra_parameters => ["--user ${hdm::user}:${hdm::group}"],
hostname => $hdm::hostname,
ports => [$hdm::port],
net => 'host',
}
}
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#
# @param hostname The hostname to use
#
# @param timezone THe timezone to use when running with docker
#
# @param hdm_path Path where one wants to install and configure hdm
#
# @param git_url The git URL to clone the hdm repo from
Expand Down Expand Up @@ -113,6 +115,7 @@
Stdlib::Port $port = 3000,
Stdlib::IP::Address::Nosubnet $bind_ip = '0.0.0.0',
String[1] $hostname = $facts['networking']['fqdn'],
String[1] $timezone = $facts['timezone'],
Stdlib::Unixpath $hdm_path = '/etc/hdm',
String[1] $user = 'hdm',
String[1] $group = 'hdm',
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "betadots-hdm",
"version": "1.0.1",
"version": "1.0.2",
"author": "betadots GmbH",
"summary": "Manage Hiera Data Manager application",
"license": "Apache-2.0",
Expand Down

0 comments on commit cb888aa

Please sign in to comment.