Supporting CE and PE and MySQL as well as embedded eXist
This commit is contained in:
parent
b1851f461e
commit
df5e3c2ff1
|
@ -1 +1,3 @@
|
|||
*.xpr
|
||||
secrets/
|
||||
mysql-connector-java*.jar
|
|
@ -2,6 +2,7 @@ FROM tomcat:alpine
|
|||
|
||||
ARG tag
|
||||
ARG build
|
||||
ARG flavour
|
||||
|
||||
RUN \
|
||||
cd /tmp \
|
||||
|
@ -13,8 +14,10 @@ RUN \
|
|||
&& unzip $build.zip \
|
||||
&& cd $build \
|
||||
&& unzip orbeon.war \
|
||||
&& rm -rf /usr/local/tomcat/webapps \
|
||||
&& mkdir -p /usr/local/tomcat/webapps/ROOT \
|
||||
&& mv WEB-INF/ /usr/local/tomcat/webapps/ROOT \
|
||||
&& mkdir -p /usr/local/orbeon \
|
||||
&& mv WEB-INF/ /usr/local/orbeon \
|
||||
&& cd \
|
||||
&& rm -rf /tmp/orbeon
|
||||
|
||||
COPY ./$flavour/tomcat/ /usr/local/tomcat/
|
||||
COPY ./$flavour/orbeon/ /usr/local/orbeon/
|
|
@ -0,0 +1,3 @@
|
|||
FROM mysql
|
||||
|
||||
COPY ./mysql/docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
|
|
@ -1,4 +1,4 @@
|
|||
version: "3"
|
||||
version: "3.3"
|
||||
services:
|
||||
servlet:
|
||||
build:
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
version: "3.3"
|
||||
services:
|
||||
servlet:
|
||||
build:
|
||||
args:
|
||||
flavour: "embedded-exist"
|
|
@ -0,0 +1,27 @@
|
|||
version: "3.3"
|
||||
services:
|
||||
servlet:
|
||||
depends_on:
|
||||
- db
|
||||
build:
|
||||
args:
|
||||
flavour: "mysql"
|
||||
networks:
|
||||
- net
|
||||
db:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-mysql
|
||||
image: mysql-orbeon
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: osuaL4Ru
|
||||
MYSQL_DATABASE: orbeon
|
||||
MYSQL_USER: orbeon
|
||||
MYSQL_PASSWORD: osuaL4Ru
|
||||
networks:
|
||||
- net
|
||||
|
||||
networks:
|
||||
net:
|
||||
|
|
@ -9,11 +9,11 @@ services:
|
|||
image: orbeon-pe
|
||||
secrets:
|
||||
- source: license
|
||||
target: /usr/local/tomcat/webapps/ROOT/WEB-INF/resources/config/license.xml
|
||||
target: /usr/local/orbeon/WEB-INF/resources/config/license.xml
|
||||
ports:
|
||||
- "8080:8080"
|
||||
|
||||
secrets:
|
||||
license:
|
||||
file: ~/.orbeon/license.xml
|
||||
file: secrets/license.xml
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context path="/orbeon"
|
||||
docBase="/usr/local/orbeon"
|
||||
reloadable="false"
|
||||
override="true"
|
||||
allowLinking="true"
|
||||
>
|
||||
</Context>
|
|
@ -0,0 +1,111 @@
|
|||
USE orbeon;
|
||||
set sql_mode='ALLOW_INVALID_DATES';
|
||||
|
||||
ALTER DATABASE CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
|
||||
CREATE TABLE orbeon_form_definition (
|
||||
created TIMESTAMP(6) ,
|
||||
last_modified_time TIMESTAMP(6) ,
|
||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
form_version INT NOT NULL,
|
||||
form_metadata VARCHAR(4000) COLLATE utf8_bin ,
|
||||
deleted CHAR(1) COLLATE utf8_bin NOT NULL,
|
||||
xml MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE orbeon_form_definition_attach (
|
||||
created TIMESTAMP(6) ,
|
||||
last_modified_time TIMESTAMP(6) ,
|
||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
form_version INT NOT NULL,
|
||||
deleted CHAR(1) COLLATE utf8_bin NOT NULL,
|
||||
file_name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
file_content LONGBLOB
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE orbeon_form_data (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
|
||||
created TIMESTAMP(6) ,
|
||||
last_modified_time TIMESTAMP(6) ,
|
||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
groupname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
organization_id INT ,
|
||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
form_version INT NOT NULL,
|
||||
document_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
draft CHAR(1) COLLATE utf8_bin NOT NULL,
|
||||
deleted CHAR(1) COLLATE utf8_bin NOT NULL,
|
||||
xml MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE orbeon_form_data_attach (
|
||||
created TIMESTAMP(6) ,
|
||||
last_modified_time TIMESTAMP(6) ,
|
||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
groupname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
organization_id INT ,
|
||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
form_version INT NOT NULL,
|
||||
document_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
draft CHAR(1) COLLATE utf8_bin NOT NULL,
|
||||
deleted CHAR(1) COLLATE utf8_bin NOT NULL,
|
||||
file_name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
file_content LONGBLOB
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE orbeon_form_data_lease (
|
||||
document_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL PRIMARY KEY,
|
||||
username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL ,
|
||||
groupname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
expiration TIMESTAMP(6) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE orbeon_organization (
|
||||
id INT NOT NULL,
|
||||
depth INT NOT NULL,
|
||||
pos INT NOT NULL,
|
||||
name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE orbeon_seq (
|
||||
val INT PRIMARY KEY AUTO_INCREMENT NOT NULL
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE orbeon_i_current (
|
||||
data_id INT NOT NULL,
|
||||
created TIMESTAMP(6) NOT NULL,
|
||||
last_modified_time TIMESTAMP(6) NOT NULL,
|
||||
last_modified_by VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
groupname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin ,
|
||||
organization_id INT ,
|
||||
app VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
form VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
form_version INT NOT NULL,
|
||||
document_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
draft CHAR(1) NOT NULL,
|
||||
FOREIGN KEY (data_id) REFERENCES orbeon_form_data(id)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE TABLE orbeon_i_control_text (
|
||||
data_id INT NOT NULL,
|
||||
pos INT NOT NULL,
|
||||
control VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
val MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
|
||||
FOREIGN KEY (data_id) REFERENCES orbeon_form_data(id)
|
||||
) ENGINE = InnoDB;
|
||||
|
||||
CREATE INDEX orbeon_form_definition_i1 ON orbeon_form_definition (app, form);
|
||||
CREATE INDEX orbeon_form_definition_att_i1 ON orbeon_form_definition_attach (app, form, file_name);
|
||||
CREATE INDEX orbeon_from_data_i1 ON orbeon_form_data (app, form, document_id, draft);
|
||||
CREATE INDEX orbeon_from_data_attach_i1 ON orbeon_form_data_attach (app, form, document_id, file_name, draft);
|
||||
CREATE UNIQUE INDEX orbeon_i_current_i1 ON orbeon_i_current (data_id, draft);
|
||||
CREATE INDEX orbeon_i_control_text_i1 ON orbeon_i_control_text (data_id);
|
|
@ -0,0 +1,17 @@
|
|||
<!--
|
||||
Copyright (C) 2008 Orbeon, Inc.
|
||||
This program 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 program 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.
|
||||
The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
|
||||
-->
|
||||
<!-- NOTE: In the future, we can use <xi:fallback> and remove this file. -->
|
||||
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:oxf="http://www.orbeon.com/oxf/processors">
|
||||
|
||||
<property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mysql"/>
|
||||
|
||||
</properties>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Context path="/orbeon"
|
||||
docBase="/usr/local/orbeon"
|
||||
reloadable="false"
|
||||
override="true"
|
||||
allowLinking="true"
|
||||
>
|
||||
<Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource"
|
||||
initialSize="3" maxActive="10" maxIdle="20" maxWait="30000"
|
||||
driverClassName="com.mysql.jdbc.Driver"
|
||||
poolPreparedStatements="true"
|
||||
validationQuery="select 1 from dual"
|
||||
testOnBorrow="true"
|
||||
username="orbeon"
|
||||
password="osuaL4Ru"
|
||||
url="jdbc:mysql://db:3306/orbeon?useUnicode=true&characterEncoding=UTF8"/>
|
||||
|
||||
</Context>
|
Loading…
Reference in New Issue