Compare commits
5 commits
72cf4e570c
...
2f548f2431
Author | SHA1 | Date | |
---|---|---|---|
Micke Nordin | 2f548f2431 | ||
Micke Nordin | 47bf118116 | ||
Magnus Andersson | c774d67745 | ||
Magnus Andersson | d5c6b9a5fd | ||
Magnus Andersson | 8d2c481569 |
|
@ -60,6 +60,9 @@ define sunetdrive::app_type (
|
|||
} else {
|
||||
$php_memory_limit_mb = 512
|
||||
}
|
||||
if $::facts['dockerhost2'] == 'yes' {
|
||||
$hostnet = 'yes'
|
||||
}
|
||||
|
||||
# These are encrypted values from local.eyaml
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -25,7 +25,11 @@ $CONFIG = array (
|
|||
'csrf.disabled' => true,
|
||||
'datadirectory' => '/var/www/html/data',
|
||||
'davstorage.request_timeout' => 86401,
|
||||
<%- if @hostnet -%>
|
||||
'dbhost' => '127.0.0.1',
|
||||
<%- else -%>
|
||||
'dbhost' => '<%= @dbhost %>',
|
||||
<%- end -%>
|
||||
'dbname' => '<%= @dbname %>',
|
||||
'dbpassword' => '<%= @mysql_user_password %>',
|
||||
'dbport' => '3306',
|
||||
|
|
|
@ -6,6 +6,9 @@ services:
|
|||
image: docker.sunet.se/drive/nextcloud-custom:<%= @nextcloud_version %>
|
||||
restart: always
|
||||
container_name: nextcloud_app_1
|
||||
<%- if @hostnet -%>
|
||||
network_mode: host
|
||||
<%- end -%>
|
||||
environment:
|
||||
- NC_PASS=<%= @admin_password%>
|
||||
volumes:
|
||||
|
@ -28,18 +31,24 @@ services:
|
|||
<% if @location =~ /^kau/ -%>
|
||||
- /mnt:/opt/tmp/
|
||||
<%- end -%>
|
||||
<%- if ! @hostnet -%>
|
||||
networks:
|
||||
- default
|
||||
- proxysql_proxysql
|
||||
<%- end -%>
|
||||
dns:
|
||||
- 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 -%>
|
||||
|
|
|
@ -5,18 +5,24 @@ services:
|
|||
proxysql:
|
||||
image: docker.sunet.se/drive/proxysql:<%= @proxysql_version %>
|
||||
container_name: proxysql_proxysql_1
|
||||
<%- if @hostnet -%>
|
||||
network_mode: host
|
||||
<%- 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 -%>
|
||||
networks:
|
||||
- proxysql
|
||||
<%- end -%>
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- proxysql:/var/lib/proxysql
|
||||
|
@ -26,6 +32,8 @@ services:
|
|||
volumes:
|
||||
proxysql:
|
||||
|
||||
<%- if !@hostnet -%>
|
||||
networks:
|
||||
proxysql:
|
||||
driver: bridge
|
||||
<%- end -%>
|
||||
|
|
Loading…
Reference in a new issue