App and proxysql: Fixes for network_type: host

This commit is contained in:
Magnus Andersson 2024-04-24 21:32:25 +02:00
parent d5c6b9a5fd
commit c774d67745
Signed by untrusted user: mandersson
GPG key ID: 19CB2C58E1F19B16
3 changed files with 11 additions and 3 deletions

View file

@ -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,

View file

@ -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 -%>

View file

@ -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