Fixed docker compose for new test my eid
This commit is contained in:
parent
912ffc9091
commit
287be23a92
2 changed files with 46 additions and 20 deletions
|
@ -14,27 +14,37 @@ class eid::test_my_eid (
|
||||||
String $service_dir = '/opt/test-my-eid',
|
String $service_dir = '/opt/test-my-eid',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# Allow HTTP/HTTPS from load balancer servers
|
if $version {
|
||||||
$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,
|
|
||||||
}
|
|
||||||
|
|
||||||
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}",'/var/log/test-my-eid','/etc/ssl']: ensure => directory }
|
||||||
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")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
# 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'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
Loading…
Add table
Reference in a new issue