avmtrf1-tools 0.38.3 → 0.39.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avmtrf1/docker/image_runner.rb +2 -2
- data/lib/avmtrf1/php/docker_images/base.rb +27 -0
- data/lib/avmtrf1/php/docker_images/factory.rb +32 -0
- data/lib/avmtrf1/php/docker_images/v5.rb +25 -0
- data/lib/avmtrf1/php/docker_images/v7.rb +26 -0
- data/lib/avmtrf1/php/docker_images/v7_v4.rb +29 -0
- data/lib/avmtrf1/php/docker_images.rb +11 -0
- data/lib/avmtrf1/tools/runner/php/docker.rb +4 -1
- data/lib/avmtrf1/tools/runner/{app_src.rb → source.rb} +2 -2
- data/lib/avmtrf1/tools/version.rb +1 -1
- data/template/avmtrf1/php/{docker_image → docker_images/base}/Dockerfile.template +1 -2
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/apache_foreground.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/apache_user.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/config_banner.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/init.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/laravel.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/lib.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/pear.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/php_composer.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/php_values.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/setup_apache_site.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/start.sh +0 -0
- data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/templates/apache_site.conf +0 -0
- metadata +22 -22
- data/lib/avmtrf1/php/docker_image.rb +0 -39
- data/lib/avmtrf1/tools/runner/trf1_dspace_base0/deploy.rb +0 -18
- data/lib/avmtrf1/tools/runner/trf1_dspace_base0.rb +0 -25
- data/lib/avmtrf1/trf1_dspace_base0/deploy.rb +0 -71
- data/lib/avmtrf1/trf1_dspace_base0/instance.rb +0 -11
- data/template/avmtrf1/trf1_dspace_base0/deploy/build.properties.template +0 -186
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbb146491f1e709ff475103267c4b962cab6299d7bfc8d50eca496da7340721a
|
4
|
+
data.tar.gz: 3bccb7ce04db3a8b84352bf3a19cf2a6ba815aab2923b046b66ca75e4b9443b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89e292994cc3d04b9862fde3513c8e6838ce21294c2ad6f570c9903f48d87759b13cd0534aa6657c425de1668925535089f855434d7376109f9019be9a775837
|
7
|
+
data.tar.gz: c191c0b8d719cd70f67117ee37276908b18c394af7ea625097e6d9dabf443468ed48b4c3b6db9049dfb278cc828b09914fdbe96df88b268c39795073b3bb1e49
|
@@ -61,7 +61,7 @@ module Avmtrf1
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def build_image(plataform_version)
|
64
|
-
r = docker_image_class.new(registry, plataform_version)
|
64
|
+
r = docker_image_class(plataform_version).new(registry, plataform_version)
|
65
65
|
r.send('version=', !parsed.no_version?)
|
66
66
|
r.snapshot = !parsed.no_snapshot?
|
67
67
|
r
|
@@ -71,7 +71,7 @@ module Avmtrf1
|
|
71
71
|
"#{plataform_name.underscore}.default_versions"
|
72
72
|
end
|
73
73
|
|
74
|
-
def docker_image_class
|
74
|
+
def docker_image_class(_plataform_version)
|
75
75
|
"Avmtrf1::#{plataform_name}::DockerImage".constantize
|
76
76
|
end
|
77
77
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'rubygems'
|
5
|
+
require 'avmtrf1/docker/image'
|
6
|
+
|
7
|
+
module Avmtrf1
|
8
|
+
module Php
|
9
|
+
module DockerImages
|
10
|
+
class Base < ::Avmtrf1::Docker::Image
|
11
|
+
enable_abstract_methods
|
12
|
+
abstract_methods :mcrypt_install, :xdebug_pecl_package
|
13
|
+
|
14
|
+
GD_OPTIONS = %w[--with-gd --with-webp-dir --with-jpeg-dir --with-png-dir --with-zlib-dir
|
15
|
+
--with-xpm-dir --with-freetype-dir].freeze
|
16
|
+
|
17
|
+
def write_in_provide_dir
|
18
|
+
::Avmtrf1::Php::DockerImages::Base.template.apply(self, provide_dir)
|
19
|
+
end
|
20
|
+
|
21
|
+
def gd_options
|
22
|
+
GD_OPTIONS.join(' ')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avmtrf1/php/docker_images/v5'
|
4
|
+
require 'avmtrf1/php/docker_images/v7'
|
5
|
+
require 'avmtrf1/php/docker_images/v7_v4'
|
6
|
+
require 'eac_ruby_utils/core_ext'
|
7
|
+
require 'rubygems'
|
8
|
+
|
9
|
+
module Avmtrf1
|
10
|
+
module Php
|
11
|
+
module DockerImages
|
12
|
+
class Factory
|
13
|
+
V7 = ::Gem::Version.new('7')
|
14
|
+
V7V4 = ::Gem::Version.new('7.4')
|
15
|
+
|
16
|
+
common_constructor :platform_version do
|
17
|
+
self.platform_version = ::Gem::Version.new(platform_version)
|
18
|
+
end
|
19
|
+
|
20
|
+
def result
|
21
|
+
if platform_version < V7
|
22
|
+
::Avmtrf1::Php::DockerImages::V5
|
23
|
+
elsif platform_version >= V7V4
|
24
|
+
::Avmtrf1::Php::DockerImages::V7V4
|
25
|
+
else
|
26
|
+
::Avmtrf1::Php::DockerImages::V7
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avmtrf1/php/docker_images/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avmtrf1
|
7
|
+
module Php
|
8
|
+
module DockerImages
|
9
|
+
class V5 < ::Avmtrf1::Php::DockerImages::Base
|
10
|
+
MCRYPT_INSTALL = <<~CODE
|
11
|
+
RUN docker-php-ext-install mcrypt
|
12
|
+
CODE
|
13
|
+
XDEBUG_PECL_PACKAGE = 'xdebug-2.5.5'
|
14
|
+
|
15
|
+
def mcrypt_install
|
16
|
+
MCRYPT_INSTALL
|
17
|
+
end
|
18
|
+
|
19
|
+
def xdebug_pecl_package
|
20
|
+
XDEBUG_PECL_PACKAGE
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avmtrf1/php/docker_images/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avmtrf1
|
7
|
+
module Php
|
8
|
+
module DockerImages
|
9
|
+
class V7 < ::Avmtrf1::Php::DockerImages::Base
|
10
|
+
MCRYPT_INSTALL = <<~CODE
|
11
|
+
RUN pecl install mcrypt
|
12
|
+
RUN echo extension=mcrypt.so > "$PHP_INI_DIR/conf.d/mcrypt.ini"
|
13
|
+
CODE
|
14
|
+
XDEBUG_PECL_PACKAGE = 'xdebug'
|
15
|
+
|
16
|
+
def mcrypt_install
|
17
|
+
MCRYPT_INSTALL
|
18
|
+
end
|
19
|
+
|
20
|
+
def xdebug_pecl_package
|
21
|
+
XDEBUG_PECL_PACKAGE
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avmtrf1/php/docker_images/v7'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avmtrf1
|
7
|
+
module Php
|
8
|
+
module DockerImages
|
9
|
+
class V7V4 < ::Avmtrf1::Php::DockerImages::V7
|
10
|
+
GD_OPTION_PARSER = /\A(.+)-dir\z/.to_parser do |m|
|
11
|
+
m[1]
|
12
|
+
end
|
13
|
+
GD_OPTION_REJECT = %w[--with-gd --with-png --with-zlib].freeze
|
14
|
+
|
15
|
+
# Referência: https://github.com/docker-library/php/issues/912
|
16
|
+
def gd_options
|
17
|
+
GD_OPTIONS
|
18
|
+
.map { |option| gd_option_replace(option) }
|
19
|
+
.reject { |option| GD_OPTION_REJECT.include?(option) }
|
20
|
+
.join(' ')
|
21
|
+
end
|
22
|
+
|
23
|
+
def gd_option_replace(option)
|
24
|
+
GD_OPTION_PARSER.parse(option).if_present(option)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avmtrf1/php/
|
3
|
+
require 'avmtrf1/php/docker_images/factory'
|
4
4
|
require 'avmtrf1/docker/image_runner'
|
5
5
|
require 'eac_cli/core_ext'
|
6
6
|
require 'eac_docker/registry'
|
@@ -10,6 +10,9 @@ module Avmtrf1
|
|
10
10
|
class Runner
|
11
11
|
class Php
|
12
12
|
class Docker < ::Avmtrf1::Docker::ImageRunner
|
13
|
+
def docker_image_class(plataform_version)
|
14
|
+
::Avmtrf1::Php::DockerImages::Factory.new(plataform_version).result
|
15
|
+
end
|
13
16
|
end
|
14
17
|
end
|
15
18
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/tools/runner/
|
3
|
+
require 'avm/tools/runner/source'
|
4
4
|
require 'avmtrf1/tools/core_ext'
|
5
5
|
|
6
6
|
module Avmtrf1
|
7
7
|
module Tools
|
8
8
|
class Runner
|
9
|
-
class
|
9
|
+
class Source < ::Avm::Tools::Runner::Source
|
10
10
|
require_sub __FILE__
|
11
11
|
end
|
12
12
|
end
|
@@ -17,8 +17,7 @@ RUN docker-php-ext-install bz2
|
|
17
17
|
# Extensão PHP "gd"
|
18
18
|
# Referência: https://stackoverflow.com/a/51041727
|
19
19
|
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev libxpm-dev
|
20
|
-
RUN docker-php-ext-configure gd
|
21
|
-
--with-zlib-dir --with-xpm-dir --with-freetype-dir
|
20
|
+
RUN docker-php-ext-configure gd %%GD_OPTIONS%%
|
22
21
|
RUN docker-php-ext-install gd
|
23
22
|
|
24
23
|
# Extensão PHP "intl"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/template/avmtrf1/php/{docker_image → docker_images/base}/aux/templates/apache_site.conf
RENAMED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avmtrf1-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.39.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-selenium
|
@@ -296,7 +296,12 @@ files:
|
|
296
296
|
- lib/avmtrf1/patches/avm/launcher/git/base.rb
|
297
297
|
- lib/avmtrf1/patches/inifile.rb
|
298
298
|
- lib/avmtrf1/php.rb
|
299
|
-
- lib/avmtrf1/php/
|
299
|
+
- lib/avmtrf1/php/docker_images.rb
|
300
|
+
- lib/avmtrf1/php/docker_images/base.rb
|
301
|
+
- lib/avmtrf1/php/docker_images/factory.rb
|
302
|
+
- lib/avmtrf1/php/docker_images/v5.rb
|
303
|
+
- lib/avmtrf1/php/docker_images/v7.rb
|
304
|
+
- lib/avmtrf1/php/docker_images/v7_v4.rb
|
300
305
|
- lib/avmtrf1/red.rb
|
301
306
|
- lib/avmtrf1/red/client.rb
|
302
307
|
- lib/avmtrf1/red/client/authorization.xml.erb
|
@@ -327,7 +332,6 @@ files:
|
|
327
332
|
- lib/avmtrf1/tools/msgraph.rb
|
328
333
|
- lib/avmtrf1/tools/msgraph/token_retrieve.rb
|
329
334
|
- lib/avmtrf1/tools/runner.rb
|
330
|
-
- lib/avmtrf1/tools/runner/app_src.rb
|
331
335
|
- lib/avmtrf1/tools/runner/check_point.rb
|
332
336
|
- lib/avmtrf1/tools/runner/check_point/login.rb
|
333
337
|
- lib/avmtrf1/tools/runner/esosti.rb
|
@@ -357,11 +361,8 @@ files:
|
|
357
361
|
- lib/avmtrf1/tools/runner/php.rb
|
358
362
|
- lib/avmtrf1/tools/runner/php/docker.rb
|
359
363
|
- lib/avmtrf1/tools/runner/red.rb
|
360
|
-
- lib/avmtrf1/tools/runner/
|
361
|
-
- lib/avmtrf1/tools/runner/trf1_dspace_base0/deploy.rb
|
364
|
+
- lib/avmtrf1/tools/runner/source.rb
|
362
365
|
- lib/avmtrf1/tools/version.rb
|
363
|
-
- lib/avmtrf1/trf1_dspace_base0/deploy.rb
|
364
|
-
- lib/avmtrf1/trf1_dspace_base0/instance.rb
|
365
366
|
- template/avmtrf1/node_js/docker_image/Dockerfile.template
|
366
367
|
- template/avmtrf1/node_js/docker_image/auxiliary/config_banner.sh
|
367
368
|
- template/avmtrf1/node_js/docker_image/auxiliary/init.sh
|
@@ -369,21 +370,20 @@ files:
|
|
369
370
|
- template/avmtrf1/node_js/docker_image/auxiliary/ng_serve.sh
|
370
371
|
- template/avmtrf1/node_js/docker_image/auxiliary/npm_install.sh
|
371
372
|
- template/avmtrf1/node_js/docker_image/auxiliary/start.sh
|
372
|
-
- template/avmtrf1/php/
|
373
|
-
- template/avmtrf1/php/
|
374
|
-
- template/avmtrf1/php/
|
375
|
-
- template/avmtrf1/php/
|
376
|
-
- template/avmtrf1/php/
|
377
|
-
- template/avmtrf1/php/
|
378
|
-
- template/avmtrf1/php/
|
379
|
-
- template/avmtrf1/php/
|
380
|
-
- template/avmtrf1/php/
|
381
|
-
- template/avmtrf1/php/
|
382
|
-
- template/avmtrf1/php/
|
383
|
-
- template/avmtrf1/php/
|
384
|
-
- template/avmtrf1/php/
|
373
|
+
- template/avmtrf1/php/docker_images/base/Dockerfile.template
|
374
|
+
- template/avmtrf1/php/docker_images/base/aux/apache_foreground.sh
|
375
|
+
- template/avmtrf1/php/docker_images/base/aux/apache_user.sh
|
376
|
+
- template/avmtrf1/php/docker_images/base/aux/config_banner.sh
|
377
|
+
- template/avmtrf1/php/docker_images/base/aux/init.sh
|
378
|
+
- template/avmtrf1/php/docker_images/base/aux/laravel.sh
|
379
|
+
- template/avmtrf1/php/docker_images/base/aux/lib.sh
|
380
|
+
- template/avmtrf1/php/docker_images/base/aux/pear.sh
|
381
|
+
- template/avmtrf1/php/docker_images/base/aux/php_composer.sh
|
382
|
+
- template/avmtrf1/php/docker_images/base/aux/php_values.sh
|
383
|
+
- template/avmtrf1/php/docker_images/base/aux/setup_apache_site.sh
|
384
|
+
- template/avmtrf1/php/docker_images/base/aux/start.sh
|
385
|
+
- template/avmtrf1/php/docker_images/base/aux/templates/apache_site.conf
|
385
386
|
- template/avmtrf1/tools/msgraph/token_retrieve/python_retriever.py
|
386
|
-
- template/avmtrf1/trf1_dspace_base0/deploy/build.properties.template
|
387
387
|
homepage: http://redmine.trf1.gov.br/projects/avm-trf1
|
388
388
|
licenses: []
|
389
389
|
metadata: {}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
require 'rubygems'
|
5
|
-
require 'avmtrf1/docker/image'
|
6
|
-
|
7
|
-
module Avmtrf1
|
8
|
-
module Php
|
9
|
-
class DockerImage < ::Avmtrf1::Docker::Image
|
10
|
-
MCRYPT_INSTALL_GREATER_EQUAL_7_2 = <<~DOCKERFILE
|
11
|
-
RUN pecl install mcrypt
|
12
|
-
RUN echo extension=mcrypt.so > "$PHP_INI_DIR/conf.d/mcrypt.ini"
|
13
|
-
DOCKERFILE
|
14
|
-
|
15
|
-
MCRYPT_INSTALL_LESSER_7_2 = <<~DOCKERFILE
|
16
|
-
RUN docker-php-ext-install mcrypt
|
17
|
-
DOCKERFILE
|
18
|
-
|
19
|
-
XDEBUG_PECL_PACKAGE_LESSER_7 = 'xdebug-2.5.5'
|
20
|
-
XDEBUG_PECL_PACKAGE_GREATER_EQUAL = 'xdebug'
|
21
|
-
|
22
|
-
def mcrypt_install
|
23
|
-
if ::Gem::Version.new(plataform_version) >= ::Gem::Version.new('7.2')
|
24
|
-
MCRYPT_INSTALL_GREATER_EQUAL_7_2
|
25
|
-
else
|
26
|
-
MCRYPT_INSTALL_LESSER_7_2
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def xdebug_pecl_package
|
31
|
-
if ::Gem::Version.new(plataform_version) < ::Gem::Version.new('7')
|
32
|
-
XDEBUG_PECL_PACKAGE_LESSER_7
|
33
|
-
else
|
34
|
-
XDEBUG_PECL_PACKAGE_GREATER_EQUAL
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avmtrf1/trf1_dspace_base0/deploy'
|
4
|
-
require 'avm/eac_webapp_base0/runner/deploy'
|
5
|
-
|
6
|
-
module Avmtrf1
|
7
|
-
module Tools
|
8
|
-
class Runner
|
9
|
-
class Trf1DspaceBase0
|
10
|
-
class Deploy < ::Avm::EacWebappBase0::Runner::Deploy
|
11
|
-
def stereotype_module
|
12
|
-
::Avmtrf1::Trf1DspaceBase0
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avmtrf1/tools/core_ext'
|
4
|
-
require 'avmtrf1/trf1_dspace_base0/instance'
|
5
|
-
|
6
|
-
module Avmtrf1
|
7
|
-
module Tools
|
8
|
-
class Runner
|
9
|
-
class Trf1DspaceBase0
|
10
|
-
require_sub __FILE__
|
11
|
-
runner_with :help, :subcommands do
|
12
|
-
desc 'Utilities for Trf1DspaceBase0 instances.'
|
13
|
-
pos_arg :instance_id
|
14
|
-
subcommands
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def instance_uncached
|
20
|
-
::Avmtrf1::Trf1DspaceBase0::Instance.by_id(parsed.instance_id)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_webapp_base0/deploy'
|
4
|
-
require 'avm/eac_webapp_base0/deploy/file_unit' # To be fixed in gem "avm-tools"
|
5
|
-
|
6
|
-
module Avmtrf1
|
7
|
-
module Trf1DspaceBase0
|
8
|
-
class Deploy < ::Avm::EacWebappBase0::Deploy
|
9
|
-
set_callback :assert_instance_branch, :after do
|
10
|
-
mvn_package
|
11
|
-
ant_update
|
12
|
-
link_apps_to_tomcat
|
13
|
-
restart_tomcat
|
14
|
-
end
|
15
|
-
|
16
|
-
def mvn_package
|
17
|
-
infom 'Executando "mvn package"...'
|
18
|
-
command('mvn', '-Ddb.name=oracle', '-U', 'package').system!
|
19
|
-
end
|
20
|
-
|
21
|
-
def ant_update
|
22
|
-
infom 'Executando "ant update"...'
|
23
|
-
command('ant', 'update').chdir(
|
24
|
-
fs_path.join('dspace', 'target', 'dspace-installer')
|
25
|
-
).system!
|
26
|
-
end
|
27
|
-
|
28
|
-
def link_apps_to_tomcat
|
29
|
-
{ 'jspui' => 'dspace', 'solr' => 'solr', 'xmlui' => 'xmlui' }.each do |app, context|
|
30
|
-
link_app_to_tomcat(app, context)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def restart_tomcat
|
35
|
-
infom 'Parando Tomcat...'
|
36
|
-
%w[shutdown startup].each do |script|
|
37
|
-
infom "Executando Tomcat:\"#{script}\".."
|
38
|
-
command(tomcat_fs_path.join('bin', "#{script}.sh")).system!
|
39
|
-
end
|
40
|
-
infom 'Esperando 15 segundos pelo Tomcat...'
|
41
|
-
sleep(15.seconds)
|
42
|
-
end
|
43
|
-
|
44
|
-
private
|
45
|
-
|
46
|
-
def command(*args)
|
47
|
-
instance.host_env.command(*args).chdir(fs_path)
|
48
|
-
end
|
49
|
-
|
50
|
-
def fs_path
|
51
|
-
::Pathname.new(instance.read_entry('fs_path'))
|
52
|
-
end
|
53
|
-
|
54
|
-
def install_fs_path
|
55
|
-
::Pathname.new(instance.read_entry('install_fs_path'))
|
56
|
-
end
|
57
|
-
|
58
|
-
def tomcat_fs_path
|
59
|
-
::Pathname.new(instance.read_entry('tomcat_fs_path'))
|
60
|
-
end
|
61
|
-
|
62
|
-
def link_app_to_tomcat(app, context)
|
63
|
-
infom "Ligando aplicação \"#{app}\" => \"#{context}\" ao tomcat..."
|
64
|
-
source_path = install_fs_path.join('webapps', app)
|
65
|
-
target_path = tomcat_fs_path.join('webapps', context)
|
66
|
-
command('rm', '-f', target_path).system!
|
67
|
-
command('ln', '-s', source_path, target_path).system!
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,186 +0,0 @@
|
|
1
|
-
# DSpace build.properties
|
2
|
-
# This file should be customised to suit your build environment.
|
3
|
-
# Note that not all configuration is handled here, only the most common
|
4
|
-
# properties that tend to differ between build environments.
|
5
|
-
# For adjusting global settings or more complex settings, edit the relevant config file.
|
6
|
-
#
|
7
|
-
# IMPORTANT: Do not remove or comment out settings in build.properties
|
8
|
-
# When you edit the "build.properties" file (or a custom *.properties file),
|
9
|
-
# take care not to remove or comment out any settings. Doing so, may cause
|
10
|
-
# your final "dspace.cfg" file to be misconfigured with regards to that
|
11
|
-
# particular setting. Instead, if you wish to remove/disable a particular
|
12
|
-
# setting, just clear out its value. For example, if you don't want to be
|
13
|
-
# notified of new user registrations, ensure the "mail.registration.notify"
|
14
|
-
# setting has no value, e.g. "mail.registration.notify="
|
15
|
-
#
|
16
|
-
|
17
|
-
##########################
|
18
|
-
# SERVER CONFIGURATION ##
|
19
|
-
##########################
|
20
|
-
|
21
|
-
# DSpace installation directory. This is the location where you want
|
22
|
-
# to install DSpace. NOTE: this value will be copied over to the
|
23
|
-
# "dspace.dir" setting in the final "dspace.cfg" file. It can be
|
24
|
-
# modified later on in your "dspace.cfg", if needed.
|
25
|
-
#dspace.install.dir=/dspace
|
26
|
-
dspace.install.dir=%%INSTALL_FS_PATH%%
|
27
|
-
|
28
|
-
# DSpace host name - should match base URL. Do not include port number
|
29
|
-
dspace.hostname = localhost
|
30
|
-
|
31
|
-
# DSpace base host URL. Include port number etc.
|
32
|
-
dspace.baseUrl = %%WEB.SCHEME%%://%%WEB.HOSTNAME%%:%%WEB.PORT%%
|
33
|
-
|
34
|
-
# The user interface you will be using for DSpace. Common usage is either xmlui or jspui
|
35
|
-
dspace.ui = jspui
|
36
|
-
|
37
|
-
# Full link your end users will use to access DSpace. In most cases, this will be the baseurl followed by
|
38
|
-
# the context path to the UI you are using.
|
39
|
-
#
|
40
|
-
# Alternatively, you can use a url redirect or deploy the web application under the servlet container root.
|
41
|
-
# In this case, make sure to remove the /${dspace.ui} from the dspace.url property.
|
42
|
-
dspace.url = ${dspace.baseUrl}/${dspace.ui}
|
43
|
-
|
44
|
-
# Name of the site
|
45
|
-
dspace.name = BDTRF1 - Biblioteca Digital do TRF1 da 1\u00aa Regi\u00e3o
|
46
|
-
|
47
|
-
# Solr server
|
48
|
-
solr.server=%%WEB.SCHEME%%://%%WEB.HOSTNAME%%:%%WEB.PORT%%/solr
|
49
|
-
|
50
|
-
# Default language for metadata values
|
51
|
-
default.language = pt_BR
|
52
|
-
|
53
|
-
##########################
|
54
|
-
# DATABASE CONFIGURATION #
|
55
|
-
##########################
|
56
|
-
|
57
|
-
# Uncomment the appropriate block below for your database.
|
58
|
-
# postgres
|
59
|
-
#db.driver=org.postgresql.Driver
|
60
|
-
#db.url=jdbc:postgresql://localhost:5432/dspace
|
61
|
-
#db.username=dspace
|
62
|
-
#db.password=dspace
|
63
|
-
|
64
|
-
# oracle
|
65
|
-
db.driver= oracle.jdbc.OracleDriver
|
66
|
-
#PRD
|
67
|
-
#db.url = jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = srvbdrac2-scan-trf1.trf1.gov.br)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME=dspace)))
|
68
|
-
#dsv
|
69
|
-
# URL for connecting to database
|
70
|
-
db.url = jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = %%DATABASE.HOSTNAME%%)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME=%%DATABASE.SERVICE_NAME%%)))
|
71
|
-
|
72
|
-
|
73
|
-
# Database username and password
|
74
|
-
db.username = %%DATABASE.USERNAME%%
|
75
|
-
db.password = %%DATABASE.PASSWORD%%
|
76
|
-
|
77
|
-
#db.url=jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.221.1.200)(PORT = 5500)) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME=orcl)))
|
78
|
-
#db.url=jdbc:oracle:thin:@10.221.1.200:5500/orcl
|
79
|
-
#db.url=jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL=TCP)(HOST=10.221.1.141)(PORT=1521)))(CONNECT_DATA=(SID=xe)(SERVER=DEDICATED)))
|
80
|
-
|
81
|
-
#db.username=dspace
|
82
|
-
#db.password=dspace
|
83
|
-
|
84
|
-
# Schema name - if your database contains multiple schemas, you can avoid
|
85
|
-
# problems with retrieving the definitions of duplicate object names by
|
86
|
-
# specifying the schema name that is used for DSpace.
|
87
|
-
# ORACLE USAGE NOTE: In Oracle, schema is equivalent to "username". This means
|
88
|
-
# specifying a "db.schema" is often unnecessary (i.e. you can leave it blank),
|
89
|
-
# UNLESS your Oracle DB Account (in db.username) has access to multiple schemas.
|
90
|
-
db.schema =
|
91
|
-
|
92
|
-
# Maximum number of DB connections in pool
|
93
|
-
db.maxconnections = 30
|
94
|
-
|
95
|
-
# Maximum time to wait before giving up if all connections in pool are busy (milliseconds)
|
96
|
-
db.maxwait = 5000
|
97
|
-
|
98
|
-
# Maximum number of idle connections in pool (-1 = unlimited)
|
99
|
-
db.maxidle = -1
|
100
|
-
|
101
|
-
# Determine if prepared statement should be cached. (default is true)
|
102
|
-
db.statementpool = true
|
103
|
-
|
104
|
-
# Specify a name for the connection pool (useful if you have multiple applications sharing Tomcat's dbcp)
|
105
|
-
# If not specified, defaults to 'dspacepool'
|
106
|
-
db.poolname = dspacepool
|
107
|
-
|
108
|
-
#######################
|
109
|
-
# EMAIL CONFIGURATION #
|
110
|
-
#######################
|
111
|
-
|
112
|
-
# SMTP mail server
|
113
|
-
mail.server = smtp.example.com
|
114
|
-
|
115
|
-
# SMTP mail server authentication username and password (if required)
|
116
|
-
# mail.server.username = myusername
|
117
|
-
# mail.server.password = mypassword
|
118
|
-
mail.server.username=
|
119
|
-
mail.server.password=
|
120
|
-
|
121
|
-
# SMTP mail server alternate port (defaults to 25)
|
122
|
-
mail.server.port = 25
|
123
|
-
|
124
|
-
# From address for mail
|
125
|
-
mail.from.address = dspace-noreply@myu.edu
|
126
|
-
|
127
|
-
# Currently limited to one recipient!
|
128
|
-
mail.feedback.recipient = dspace-help@myu.edu
|
129
|
-
|
130
|
-
# General site administration (Webmaster) e-mail
|
131
|
-
mail.admin = serau@trf1.jus.br
|
132
|
-
|
133
|
-
# Recipient for server errors and alerts
|
134
|
-
#mail.alert.recipient = email-address-here
|
135
|
-
mail.alert.recipient=
|
136
|
-
|
137
|
-
# Recipient for new user registration emails
|
138
|
-
#mail.registration.notify = email-address-here
|
139
|
-
mail.registration.notify=
|
140
|
-
|
141
|
-
|
142
|
-
########################
|
143
|
-
# HANDLE CONFIGURATION #
|
144
|
-
########################
|
145
|
-
|
146
|
-
# Canonical Handle URL prefix
|
147
|
-
#
|
148
|
-
# By default, DSpace is configured to use http://hdl.handle.net/
|
149
|
-
# as the canonical URL prefix when generating dc.identifier.uri
|
150
|
-
# during submission, and in the 'identifier' displayed in JSPUI
|
151
|
-
# item record pages.
|
152
|
-
#
|
153
|
-
# If you do not subscribe to CNRI's handle service, you can change this
|
154
|
-
# to match the persistent URL service you use, or you can force DSpace
|
155
|
-
# to use your site's URL, eg.
|
156
|
-
#handle.canonical.prefix = ${dspace.url}/handle/
|
157
|
-
#
|
158
|
-
# Note that this will not alter dc.identifer.uri metadata for existing
|
159
|
-
# items (only for subsequent submissions), but it will alter the URL
|
160
|
-
# in JSPUI's 'identifier' message on item record pages for existing items.
|
161
|
-
#
|
162
|
-
# If omitted, the canonical URL prefix will be http://hdl.handle.net/
|
163
|
-
handle.canonical.prefix = http://www.trf1.jus.br/dspace/handle/
|
164
|
-
|
165
|
-
# CNRI Handle prefix
|
166
|
-
handle.prefix = 123
|
167
|
-
|
168
|
-
#######################
|
169
|
-
# PROXY CONFIGURATION #
|
170
|
-
#######################
|
171
|
-
# uncomment and specify both properties if proxy server required
|
172
|
-
# proxy server for external http requests - use regular hostname without port number
|
173
|
-
http.proxy.host =
|
174
|
-
|
175
|
-
# port number of proxy server
|
176
|
-
http.proxy.port =
|
177
|
-
|
178
|
-
#####################
|
179
|
-
# LOGLEVEL SETTINGS #
|
180
|
-
#####################
|
181
|
-
loglevel.other = INFO
|
182
|
-
# loglevel.other: Log level for other third-party tools/APIs used by DSpace
|
183
|
-
# Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL
|
184
|
-
loglevel.dspace = INFO
|
185
|
-
# loglevel.dspace: Log level for all DSpace-specific code (org.dspace.*)
|
186
|
-
# Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL
|