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