This project need to test onlyoffice documentserver via convert service
In order to start it, a set of keys must first be installed on the host
-
For local startup in developer mode, recommended installing a local
bundle config
file.bundle config set --local with development
-
Afterwards install the dependencies with the bundle.
bundle install
-
Reconfigure
docker-compose.yml
vianginx
Specify the path to the local directory in the config file for the volume setting
nginx: ... volumes: - ./files_tmp:/usr/share/nginx/html/ ...
-
Run auxiliary containers (wait ~120 sec)
docker-compose up -d documentserver docker-compose up -d nginx
-
Configuration .env
-
DOCSERVER_VERSION
must contain the version of the server document:example: 7.3.0.100
-
-
Configuration ENV`s
file
spec/spec_helper.rb
contains global variables. Explain them and fill them out similarly to the chart:Warning: The path must not contain a slash at the end
# ENV['DOCUMENTSERVER'] = '[URL to server]' # ENV['NGINX'] = '[URL to nginx]' # ENV['DOCUMENTSERVER_JWT'] = '[JWT key if enable]'
-
Run all specs for convertation
rspec
-
Add all keys to
Dockerfile
:S3_KEY
- is a s3 public keyS3_PRIVATE_KEY
- is a s3 private keyPALLADIUM_TOKEN
- token for write result to palladiumDOCUMENTSERVER_JWT
- JWT key is used by default (see the documentation on configuring the server document)
-
Configuration
.env
-
DOCSERVER_VERSION
must contain the version of the server document:example: 7.3.0.100
-
-
Build and run project (detached mode):
docker-compose up -d
-
In a few minutes the results will start to be recorded in
palladium
File will be downloaded from s3 to file_tmp
.
This folder (volume) is a same for testing_project
and nginx
.
After it, testing_project
will send request to document server
with link to file from nginx
.
After conversion, response will parsed, and result will send to palladium
-
Error in response (-1, -2, -3, -7)
At first, you need to open file in editors and save in like pdf, and after it you need to create new bug to Konovalov Sergey.
Example of bug report - 45253 (private bug tracker)
-
Error in response -4
It is because file can not to be downloaded by convert service. Check downloading inside of documentserver docker container. If it work, you need to add
access control allow origin
, or something like it to your web server with files. Read more about in documentation.If you still not convert file, pay attention to existing localhosts in url's