diff --git a/manifests/proxysql.pp b/manifests/proxysql.pp index 1c2b7fb..fc45669 100644 --- a/manifests/proxysql.pp +++ b/manifests/proxysql.pp @@ -26,6 +26,9 @@ class sunetdrive::proxysql ( $mysql_user = safe_hiera('mysql_user') $transaction_persistent = 1 + if $::facts['dockerhost2'] == 'yes' { + $hostnet = 'yes' + } file { '/usr/local/bin/proxysql': ensure => file, diff --git a/templates/application/docker-compose_nextcloud.yml.erb b/templates/application/docker-compose_nextcloud.yml.erb index 33c7572..054ebe5 100644 --- a/templates/application/docker-compose_nextcloud.yml.erb +++ b/templates/application/docker-compose_nextcloud.yml.erb @@ -40,11 +40,15 @@ services: - 89.46.20.75 - 89.46.21.29 - 89.32.32.32 +<%- if !@hostnet -%> ports: - 443:443 +<%- end -%> command: sh -c 'tail -f /var/www/html/data/nextcloud.log | tee -a /proc/1/fd/2 & apachectl -D FOREGROUND' tty: true +<%- if !@hostnet -%> networks: proxysql_proxysql: external: true +<%- end -%> diff --git a/templates/proxysql/docker-compose_proxysql.yml.erb b/templates/proxysql/docker-compose_proxysql.yml.erb index 7c39583..6159526 100644 --- a/templates/proxysql/docker-compose_proxysql.yml.erb +++ b/templates/proxysql/docker-compose_proxysql.yml.erb @@ -7,18 +7,19 @@ services: container_name: proxysql_proxysql_1 <%- if @hostnet -%> network_mode: host -<%- end -%> +<%- else -%> ports: - 3306:3306 - 6032:6032 - 6080:6080 +<%- end -%> environment: INITIALIZE: 1 dns: - 89.46.20.75 - 89.46.21.29 - 89.32.32.32 -<%- if ! @hostnet -%> +<%- if !@hostnet -%> networks: - proxysql <%- end -%> @@ -31,7 +32,7 @@ services: volumes: proxysql: -<%- if ! @hostnet -%> +<%- if !@hostnet -%> networks: proxysql: driver: bridge