Add dameng stand
This commit is contained in:
parent
eb643e3adb
commit
908d70bcee
|
@ -73,6 +73,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
|||
|
||||
COPY config /app/ds/setup/config/
|
||||
COPY run-document-server.sh /app/ds/run-document-server.sh
|
||||
COPY bin /opt/dmdbms/bin
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
|
|
55
docker-compose-damengDB.yml
Normal file
55
docker-compose-damengDB.yml
Normal file
|
@ -0,0 +1,55 @@
|
|||
version: '2'
|
||||
services:
|
||||
onlyoffice-documentserver:
|
||||
image: onlyoffice/4testing-documentserver-ee:99.99.99.${BUILD}
|
||||
container_name: onlyoffice-documentserver
|
||||
depends_on:
|
||||
- onlyoffice-dameng
|
||||
- onlyoffice-rabbitmq
|
||||
environment:
|
||||
- DB_TYPE=dameng
|
||||
- DB_HOST=onlyoffice-dameng
|
||||
- DB_PORT=5236
|
||||
- DB_NAME=onlyoffice
|
||||
- DB_USER=onlyoffice
|
||||
- AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
|
||||
# Uncomment strings below to enable the JSON Web Token validation.
|
||||
#- JWT_ENABLED=true
|
||||
#- JWT_SECRET=secret
|
||||
#- JWT_HEADER=Authorization
|
||||
#- JWT_IN_BODY=true
|
||||
ports:
|
||||
- '80:80'
|
||||
- '443:443'
|
||||
stdin_open: true
|
||||
restart: always
|
||||
stop_grace_period: 60s
|
||||
volumes:
|
||||
- /var/www/onlyoffice/Data
|
||||
- /var/log/onlyoffice
|
||||
- /var/lib/onlyoffice/documentserver/App_Data/cache/files
|
||||
- /var/www/onlyoffice/documentserver-example/public/files
|
||||
- /usr/share/fonts
|
||||
|
||||
onlyoffice-rabbitmq:
|
||||
container_name: onlyoffice-rabbitmq
|
||||
image: rabbitmq
|
||||
restart: always
|
||||
expose:
|
||||
- '5672'
|
||||
|
||||
onlyoffice-dameng:
|
||||
container_name: onlyoffice-dameng
|
||||
image: dm8_single:v8.1.2.128_ent_x86_64_ctm_pack4
|
||||
environment:
|
||||
- PAGE_SIZE=16
|
||||
- LD_LIBRARY_PATH=/opt/dmdbms/bin
|
||||
- INSTANCE_NAME=dm8_01
|
||||
restart: always
|
||||
expose:
|
||||
- '5236'
|
||||
volumes:
|
||||
- dameng_data:/opt/dmdbms/data
|
||||
|
||||
volumes:
|
||||
dameng_data:
|
8
prepare.sh
Executable file
8
prepare.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
# Download dameng image
|
||||
wget -O dm8_docker.tar -c https://download.dameng.com/eco/dm8/dm8_20220822_rev166351_x86_rh6_64_ctm.tar
|
||||
docker load -i dm8_docker.tar
|
||||
echo "OK: Dameng image ready. Now you can run: docker compose up -d"
|
||||
# Extract disql bin files
|
||||
tar -xvf disql.tar
|
||||
echo "OK: disql files was extracted in ./bin folder"
|
|
@ -149,6 +149,9 @@ read_setting(){
|
|||
"mariadb"|"mysql")
|
||||
DB_PORT=${DB_PORT:-"3306"}
|
||||
;;
|
||||
"dameng")
|
||||
DB_PORT=${DB_PORT:-"5236"}
|
||||
;;
|
||||
"")
|
||||
DB_PORT=${DB_PORT:-${POSTGRESQL_SERVER_PORT:-$(${JSON} services.CoAuthoring.sql.dbPort)}}
|
||||
;;
|
||||
|
@ -371,6 +374,10 @@ create_db_tbl() {
|
|||
"mariadb"|"mysql")
|
||||
create_mysql_tbl
|
||||
;;
|
||||
"dameng")
|
||||
create_dameng_tbl
|
||||
;;
|
||||
|
||||
esac
|
||||
}
|
||||
|
||||
|
@ -413,6 +420,16 @@ create_postgresql_tbl() {
|
|||
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
|
||||
}
|
||||
|
||||
create_dameng_tbl() {
|
||||
DM8_USER=SYSDBA
|
||||
DM8_PASS=SYSDBA001
|
||||
|
||||
(cd /opt/dmdbms/bin/ && ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT -e "create user "onlyoffice" identified by "onlyoffice" password_policy 0;")
|
||||
|
||||
# Create db on remote server
|
||||
(cd /opt/dmdbms/bin/ && ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT \`$APP_DIR/server/schema/dameng/createdb.sql)
|
||||
}
|
||||
|
||||
create_mysql_tbl() {
|
||||
CONNECTION_PARAMS="-h$DB_HOST -P$DB_PORT -u$DB_USER -p$DB_PWD -w"
|
||||
MYSQL="mysql -q $CONNECTION_PARAMS"
|
||||
|
|
Loading…
Reference in a new issue