Merge pull request '2381-mariaDB' (#374) from 2381-mariaDB into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #374
Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
Joan Sanchez 2020-09-28 06:25:28 +00:00
commit a573fa4bbb
8 changed files with 13 additions and 17 deletions

View File

@ -1,4 +1,4 @@
FROM mysql:8.0.18 FROM mariadb:10.4.13
ENV MYSQL_ROOT_PASSWORD root ENV MYSQL_ROOT_PASSWORD root
ENV TZ Europe/Madrid ENV TZ Europe/Madrid
@ -7,9 +7,9 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates \ && apt-get install -y --no-install-recommends curl ca-certificates \
&& curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \ && curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
&& echo "deb http://apt.verdnatura.es/ stretch main" > /etc/apt/sources.list.d/vn.list \ && echo "deb http://apt.verdnatura.es/ jessie main" > /etc/apt/sources.list.d/vn.list \
&& apt-get update \ && apt-get update \
&& apt-get install -y vn-mysql libmysqlclient21 \ && apt-get install -y vn-mariadb \
&& apt-get purge -y --auto-remove curl ca-certificates \ && apt-get purge -y --auto-remove curl ca-certificates \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
@ -19,16 +19,16 @@ COPY docker/docker-init.sh docker/docker-start.sh /usr/local/bin/
RUN mkdir /mysql-data \ RUN mkdir /mysql-data \
&& chown -R mysql:mysql /mysql-data && chown -R mysql:mysql /mysql-data
WORKDIR /docker-entrypoint-initdb.d COPY dump /docker-boot/dump
COPY changes /docker-boot/changes
COPY import-changes.sh config.ini /docker-boot/
COPY dump dump
COPY docker/docker-boot.sh /docker-entrypoint-initdb.d/ COPY docker/docker-boot.sh /docker-entrypoint-initdb.d/
COPY changes import/changes
COPY import-changes.sh config.ini import/
ARG STAMP=unknown ARG STAMP=unknown
RUN gosu mysql docker-init.sh mysqld \ RUN gosu mysql docker-init.sh mysqld \
&& rm -rf /docker-entrypoint-initdb.d/* && rm -rf /docker-entrypoint-initdb.d/* \
&& rm -rf /docker-boot
USER mysql USER mysql
ENTRYPOINT ["docker-start.sh"] ENTRYPOINT ["docker-start.sh"]

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
cd /docker-boot
export MYSQL_PWD=root export MYSQL_PWD=root
mysql_import() { mysql_import() {
@ -11,7 +12,7 @@ mysql_import() {
mysql_import dump/structure.sql mysql_import dump/structure.sql
mysql_import dump/mysqlPlugins.sql mysql_import dump/mysqlPlugins.sql
mysql_import dump/dumpedFixtures.sql mysql_import dump/dumpedFixtures.sql
import/import-changes.sh ./import-changes.sh
mysql_import dump/fixtures.sql mysql_import dump/fixtures.sql
echo "[INFO] -> Import finished" echo "[INFO] -> Import finished"

View File

@ -13,5 +13,4 @@ docker_setup_db
docker_process_init_files /docker-entrypoint-initdb.d/* docker_process_init_files /docker-entrypoint-initdb.d/*
mysql_expire_root_user
docker_temp_server_stop docker_temp_server_stop

View File

@ -2,9 +2,7 @@
innodb_log_file_size = 4M innodb_log_file_size = 4M
innodb_autoextend_increment = 4 innodb_autoextend_increment = 4
innodb_page_size = 8K innodb_page_size = 8K
innodb_default_row_format = COMPACT
log_bin_trust_function_creators = ON log_bin_trust_function_creators = ON
datadir = /mysql-data datadir = /mysql-data
sql_mode = NO_ENGINE_SUBSTITUTION sql_mode = NO_ENGINE_SUBSTITUTION
innodb_temp_data_file_path = /tmp/ibtmp1:12M:autoextend
skip-log-bin skip-log-bin

View File

@ -1,8 +1,6 @@
CREATE SCHEMA IF NOT EXISTS `vn2008`; CREATE SCHEMA IF NOT EXISTS `vn2008`;
CREATE SCHEMA IF NOT EXISTS `tmp`; CREATE SCHEMA IF NOT EXISTS `tmp`;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
ALTER TABLE `vn`.`itemTaxCountry` AUTO_INCREMENT = 1; ALTER TABLE `vn`.`itemTaxCountry` AUTO_INCREMENT = 1;
ALTER TABLE `vn`.`address` AUTO_INCREMENT = 1; ALTER TABLE `vn`.`address` AUTO_INCREMENT = 1;
ALTER TABLE `vn`.`zoneGeo` AUTO_INCREMENT = 1; ALTER TABLE `vn`.`zoneGeo` AUTO_INCREMENT = 1;

View File

@ -24,7 +24,7 @@ describe('client consumption() filter', () => {
where: { where: {
clientFk: 101 clientFk: 101
}, },
order: 'itemTypeFk, itemName, itemSize' order: 'itemFk'
}; };
const result = await app.models.Client.consumption(ctx, filter); const result = await app.models.Client.consumption(ctx, filter);

View File

@ -3,7 +3,7 @@
url="Orders/filter" url="Orders/filter"
limit="20" limit="20"
data="orders" data="orders"
order="landed DESC, clientFk"> order="landed DESC, clientFk, id DESC">
</vn-crud-model> </vn-crud-model>
<vn-portal slot="topbar"> <vn-portal slot="topbar">
<vn-searchbar <vn-searchbar

View File

@ -66,7 +66,7 @@ describe('ticket-request filter()', () => {
it('should return the ticket request matching the warehouse ID', async() => { it('should return the ticket request matching the warehouse ID', async() => {
let ctx = {req: {accessToken: {userId: 9}}, args: {warehouse: 1}}; let ctx = {req: {accessToken: {userId: 9}}, args: {warehouse: 1}};
let result = await app.models.TicketRequest.filter(ctx); let result = await app.models.TicketRequest.filter(ctx, {order: 'id'});
let requestId = result[0].id; let requestId = result[0].id;
expect(requestId).toEqual(3); expect(requestId).toEqual(3);