Switched to MySQL

This commit is contained in:
WilliamMiceli
2018-12-18 11:09:21 -05:00
parent a8884a8e7e
commit 2c6ec7a777
2 changed files with 42 additions and 12 deletions

View File

@@ -2,13 +2,13 @@ version: '2'
services:
xwiki:
image: xwiki:stable-postgres-tomcat
image: xwiki:latest
container_name: xwiki
dns:
- 1.1.1.1
- 1.0.0.1
environment:
DB_HOST: postgresql
DB_HOST: mysql
DB_DATABASE: xwiki
DB_USER: xwiki_user
DB_PASSWORD: ${DB_USER_PASS}
@@ -45,18 +45,17 @@ services:
- /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system
- /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system
- /RancherCattle/${DATA_DIR}/Application:/usr/local/xwiki
postgresql:
image: postgres:alpine
container_name: postgresql
mysql:
image: mysql:5.7
container_name: mysql
dns:
- 1.1.1.1
- 1.0.0.1
environment:
POSTGRES_INITDB_ARGS: "--encoding=UTF8"
POSTGRES_DB: xwiki
POSTGRES_ROOT_PASSWORD: ${DB_ROOT_PASS}
POSTGRES_USER: xwiki_user
POSTGRES_PASSWORD: ${DB_USER_PASS}
MYSQL_DATABASE: xwiki
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
MYSQL_USER: xwiki_user
MYSQL_PASSWORD: ${DB_USER_PASS}
labels:
io.rancher.container.pull_image: always
{{- if .Values.HOST_LABEL}}
@@ -70,8 +69,8 @@ services:
volumes:
- /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system
- /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system
- /RancherCattle/${DATA_DIR}/Database:/var/lib/postgresql/data
- /RancherCattle/${DATA_DIR}/Temp:/var/run/postgresql # Band-aid for PostgreSQL issue of being "out of space"
- /RancherCattle/${DATA_DIR}/Configuration/xwiki.cnf:/etc/mysql/conf.d/xwiki.cnf
- /RancherCattle/${DATA_DIR}/Database:/var/lib/mysql
networks:
db-admin:

View File

@@ -0,0 +1,31 @@
# ---------------------------------------------------------------------------
# See the NOTICE file distributed with this work for additional
# information regarding copyright ownership.
#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of
# the License, or (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this software; if not, write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
# ---------------------------------------------------------------------------
[client]
default-character-set = utf8
[mysqld]
character-set-server = utf8
collation-server = utf8_bin
explicit_defaults_for_timestamp = 1
[mysql]
default-character-set = utf8