App and proxysql: Fixes for network_type: host
This commit is contained in:
parent
d5c6b9a5fd
commit
c774d67745
3 changed files with 11 additions and 3 deletions
manifests
templates
|
@ -26,6 +26,9 @@ class sunetdrive::proxysql (
|
||||||
$mysql_user = safe_hiera('mysql_user')
|
$mysql_user = safe_hiera('mysql_user')
|
||||||
|
|
||||||
$transaction_persistent = 1
|
$transaction_persistent = 1
|
||||||
|
if $::facts['dockerhost2'] == 'yes' {
|
||||||
|
$hostnet = 'yes'
|
||||||
|
}
|
||||||
|
|
||||||
file { '/usr/local/bin/proxysql':
|
file { '/usr/local/bin/proxysql':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
|
|
|
@ -40,11 +40,15 @@ services:
|
||||||
- 89.46.20.75
|
- 89.46.20.75
|
||||||
- 89.46.21.29
|
- 89.46.21.29
|
||||||
- 89.32.32.32
|
- 89.32.32.32
|
||||||
|
<%- if !@hostnet -%>
|
||||||
ports:
|
ports:
|
||||||
- 443:443
|
- 443:443
|
||||||
|
<%- end -%>
|
||||||
command: sh -c 'tail -f /var/www/html/data/nextcloud.log | tee -a /proc/1/fd/2 & apachectl -D FOREGROUND'
|
command: sh -c 'tail -f /var/www/html/data/nextcloud.log | tee -a /proc/1/fd/2 & apachectl -D FOREGROUND'
|
||||||
tty: true
|
tty: true
|
||||||
|
|
||||||
|
<%- if !@hostnet -%>
|
||||||
networks:
|
networks:
|
||||||
proxysql_proxysql:
|
proxysql_proxysql:
|
||||||
external: true
|
external: true
|
||||||
|
<%- end -%>
|
||||||
|
|
|
@ -7,11 +7,12 @@ services:
|
||||||
container_name: proxysql_proxysql_1
|
container_name: proxysql_proxysql_1
|
||||||
<%- if @hostnet -%>
|
<%- if @hostnet -%>
|
||||||
network_mode: host
|
network_mode: host
|
||||||
<%- end -%>
|
<%- else -%>
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
- 6032:6032
|
- 6032:6032
|
||||||
- 6080:6080
|
- 6080:6080
|
||||||
|
<%- end -%>
|
||||||
environment:
|
environment:
|
||||||
INITIALIZE: 1
|
INITIALIZE: 1
|
||||||
dns:
|
dns:
|
||||||
|
|
Loading…
Add table
Reference in a new issue