Fixed docker compose for new test my eid

This commit is contained in:
Maria Haider 2025-03-18 15:16:42 +01:00
parent 912ffc9091
commit 287be23a92
Signed by: mariah
GPG key ID: 6EF520A1829E8B1D
2 changed files with 46 additions and 20 deletions

View file

@ -14,27 +14,37 @@ class eid::test_my_eid (
String $service_dir = '/opt/test-my-eid',
) {
# Allow HTTP/HTTPS from load balancer servers
$lb_ips = hiera_array("lb_${environment}_servers",[])
sunet::nftables::allow { 'allow-http-from-lbs':
from => $lb_ips,
port => 80,
}
sunet::nftables::allow { 'allow-https-from-lbs':
from => $lb_ips,
port => 443,
}
if $version {
file {["${service_dir}",'/var/log/test-my-eid','/etc/ssl']: ensure => directory }
# Allow HTTP/HTTPS from load balancer servers
$lb_ips = hiera_array("lb_${environment}_servers",[])
sunet::nftables::allow { 'allow-http-from-lbs':
from => $lb_ips,
port => 80,
}
sunet::nftables::allow { 'allow-https-from-lbs':
from => $lb_ips,
port => 443,
}
# Create the environment specific config files from template
file { "${service_dir}/application-${environment}.yml":
ensure => 'file',
content => template("eid/test_my_eid/application-${environment}.yml.erb")
}
file { "${service_dir}/idp-disco-${environment}.yml":
ensure => 'file',
content => template("eid/test_my_eid/idp-disco-${environment}.yml.erb")
}
file {["${service_dir}",'/var/log/test-my-eid','/etc/ssl']: ensure => directory }
# Create the environment specific config files from template
file { "${service_dir}/application-${environment}.yml":
ensure => 'file',
content => template("eid/test_my_eid/application-${environment}.yml.erb")
}
file { "${service_dir}/idp-disco-${environment}.yml":
ensure => 'file',
content => template("eid/test_my_eid/idp-disco-${environment}.yml.erb")
}
sunet::docker_compose { 'test-my-eid':
content => template('eid/connector/docker-compose.yml.erb'),
service_name => 'test-my-eid',
compose_dir => '/opt/',
compose_filename => 'docker-compose.yml',
description => 'Test My eID'
}
}
}

View file

@ -0,0 +1,16 @@
---
services:
test-my-eid:
image: docker.sunet.se/test-my-eid:<%= @version %>
container_name: test-my-eid
environment:
- SP_CONFIG_DIRECTORY=/etc/test-my-eid
- SPRING_CONFIG_ADDITIONAL_LOCATION=/etc/test-my-eid/
- SPRING_PROFILES_ACTIVE=<%= @environment %>
volumes:
- '<%= @service_dir %>:/etc/eidas-connector'
- '/etc/ssl:/etc/ssl'
ports:
- "443:8443"