avm-eac_redmine_base0 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5667c3c6f10b76812ba085734ad08b16976a8506960eeb8a4fbfba1efb7c8292
4
- data.tar.gz: ca54244f4a414e4dd374b1b73aab33ef48ba518d8b1beecbc81a14a8b6bf31cd
3
+ metadata.gz: d039b63745f6ff52b90208bc8c34d77fb6a039fd2f01c7514daa4e653a7d6227
4
+ data.tar.gz: 2b72e42fef8b76a9ca0273b98f208e6f755882f6a13c16d92e7116b01619451e
5
5
  SHA512:
6
- metadata.gz: e27d0a8b096151f3744aae1bfdfd6883ed36f53cc0b99b3885126e2f3e96d9dd7669c7402b998e944a8a07dde0ca255c4d747ca139ad7abb895cad20e4a4d616
7
- data.tar.gz: 140ae0189029862567373276c78de8d3a05b8125239900523cf8a5fd5b53c154a857c489862aed141e4200cb9984840af8ae4dd9eca749619a28f3ea6802b088
6
+ metadata.gz: 3724df96fe48092b92a8cd3212fddaf23e6e4e9d6e469ad3216802fbbc1013dabd1b9f643ccd7cc6bbc383051d74ca58f96d7e35472b5a35fbfb02271fcf7aaf
7
+ data.tar.gz: 34354bd5f293f66d3f4733f1418dd42ec6e3b255f970db06b1fcdf38fb050f9ede0c9d451fc1bc33d10e62f40b5985aa6430dd85c6a857c9a4ebd79b636dc898
@@ -76,7 +76,7 @@ module Avm
76
76
 
77
77
  def sync_content
78
78
  ::Avm::Sync.new(source_path, target_path)
79
- .add_exclude('/*').add_includes(*target_files_to_remove).move_mode(true).run
79
+ .add_exclude('/*').add_includes(*target_files_to_remove).move_mode(true).run
80
80
  end
81
81
 
82
82
  # @return [EacFs::CachedDownload]
@@ -99,8 +99,8 @@ module Avm
99
99
 
100
100
  def target_files_to_remove
101
101
  git_repo.command('ls-files').execute!
102
- .each_line.map { |v| "/#{v.strip}" }
103
- .without(*TARGET_KEEP)
102
+ .each_line.map { |v| "/#{v.strip}" }
103
+ .without(*TARGET_KEEP)
104
104
  end
105
105
 
106
106
  def target_path_uncached
@@ -12,7 +12,8 @@ module Avm
12
12
  enable_simple_cache
13
13
 
14
14
  BASE_IMAGE = 'ubuntu:20.04'
15
- INSTALLER_TARGET_TASK = 'redmine_as_apache_base'
15
+ INSTALLER_TARGET_TASK_WITH_WEB_PATH_BLANK = 'redmine_as_apache_base'
16
+ INSTALLER_TARGET_TASK_WITH_WEB_PATH_PRESENT = 'redmine_as_apache_path'
16
17
  DATABASE_INTERNAL_HOSTNAME = 'localhost'
17
18
  REDMINE_SOURCE_HOST_SUBPATH = 'redmine_source'
18
19
 
@@ -20,6 +21,12 @@ module Avm
20
21
  instance.id
21
22
  end
22
23
 
24
+ def apache_setup
25
+ return '' if web_path_present?
26
+
27
+ template.child('Dockerfile_apache_setup').apply(self)
28
+ end
29
+
23
30
  def base_image
24
31
  eac_ubuntu_base0_instance.docker_image.provide.id
25
32
  end
@@ -30,7 +37,11 @@ module Avm
30
37
  end
31
38
 
32
39
  def installer_target_task
33
- INSTALLER_TARGET_TASK
40
+ if web_path_present?
41
+ INSTALLER_TARGET_TASK_WITH_WEB_PATH_PRESENT
42
+ else
43
+ INSTALLER_TARGET_TASK_WITH_WEB_PATH_BLANK
44
+ end
34
45
  end
35
46
 
36
47
  def redmine_user
@@ -53,6 +64,10 @@ module Avm
53
64
  '/start.sh'
54
65
  end
55
66
 
67
+ def web_path_present?
68
+ ::Addressable::URI.parse(instance.web_url).path.present?
69
+ end
70
+
56
71
  private
57
72
 
58
73
  def eac_ubuntu_base0_instance
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.5.0'
5
+ VERSION = '0.5.1'
6
6
  end
7
7
  end
@@ -22,19 +22,13 @@ RUN SKIP_DATABASE='%%skip_database%%' \
22
22
  '%%redmine_path%%/plugins/redmine_installer/installer/run.sh' '%%installer_target_task%%'
23
23
 
24
24
  # Apache / Configuração do virtualhost
25
- COPY apache_http_virtualhost.conf /etc/apache2/sites-available/redmine.conf
26
- COPY apache_https_virtualhost.conf /etc/apache2/sites-available/redmine_ssl.conf
27
- USER root
28
- RUN a2ensite redmine
29
- RUN a2ensite redmine_ssl
30
- RUN a2dissite 000-default
31
- RUN a2enmod ssl
32
- RUN service apache2 restart
25
+ %%apache_setup%%
33
26
 
34
27
  # Portas
35
28
  EXPOSE 80/tcp 443/tcp 22/tcp
36
29
 
37
30
  # Execução
31
+ USER root
38
32
  COPY start.sh '%%start_path%%'
39
33
  RUN /bin/chmod +x '%%start_path%%'
40
34
  RUN /bin/chown '%%redmine_user%%:%%redmine_user%%' '%%start_path%%'
@@ -0,0 +1,8 @@
1
+ COPY apache_http_virtualhost.conf /etc/apache2/sites-available/redmine.conf
2
+ COPY apache_https_virtualhost.conf /etc/apache2/sites-available/redmine_ssl.conf
3
+ USER root
4
+ RUN a2ensite redmine
5
+ RUN a2ensite redmine_ssl
6
+ RUN a2dissite 000-default
7
+ RUN a2enmod ssl
8
+ RUN service apache2 restart
@@ -34,7 +34,7 @@ function postgresql_start() {
34
34
 
35
35
  function request_http_interface() {
36
36
  title 'Requesting web interface...'
37
- wget 'http://localhost' &> /dev/null
37
+ wget 'http://localhost%%web.path%%' &> /dev/null
38
38
  }
39
39
 
40
40
  function redmine_log() {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-eac_redmine_base0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-08 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm-eac_rails_base1
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.4'
103
+ version: 0.5.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.4'
110
+ version: 0.5.1
111
111
  description:
112
112
  email:
113
113
  executables: []
@@ -126,6 +126,7 @@ files:
126
126
  - template/avm/eac_redmine_base0/deploy/config/install.sh.template
127
127
  - template/avm/eac_redmine_base0/deploy/config/secrets.yml
128
128
  - template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template
129
+ - template/avm/eac_redmine_base0/instances/docker_image/Dockerfile_apache_setup
129
130
  - template/avm/eac_redmine_base0/instances/docker_image/apache_http_virtualhost.conf.template
130
131
  - template/avm/eac_redmine_base0/instances/docker_image/apache_https_virtualhost.conf.template
131
132
  - template/avm/eac_redmine_base0/instances/docker_image/install_settings.sh.template