avm-eac_redmine_base0 0.3.0 → 0.3.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: 97df75bc9d11dc852876791b5db9e5980dff9ab9530635b59ef19d02a07fab7f
4
- data.tar.gz: 82cbadfc771b9e10dee39d5e4cdc5344e0938e9aef7e98d0d0a1a0f9993138e9
3
+ metadata.gz: 9daf2df205e9d703cf516938c642d525084d35fb3437b22229d2bf55718dbd8c
4
+ data.tar.gz: 8b4ec0d4fc6906e204e6c599801097e29be8b71c97d54281d1f43f22279fbc24
5
5
  SHA512:
6
- metadata.gz: a897296cc1a358072d73e24711f7a5d92e697f207797c40ba869b9b8bf99e6ad601fa28239fb875f309410d9b7413674c4fb4c91e635178173a33e146327037c
7
- data.tar.gz: c94e64a770e53b17a8747708360165bf9992c8e766bfa7955232e5795131194caa2c130c7aeb40a075c713d42d15f3d55070e931e717e6cfbffe447c34acfe9c
6
+ metadata.gz: 933a04ed3fe842bb9ac5f90ecbfc52c618d8b3f0819bfd2dadf41fe22d3b4c1a70129d0a0258952d89c966e0cde3f38b933630687867ca85e114461ccb5d653c
7
+ data.tar.gz: 55bf5505eb04d117eba59b1e6d51adc57113a70e7fe254e2fac5eec30ba2f561c48724bada6e2b6d64ff3dda2d5c6556b847e48f6cd45c74ee1c1323536832f9
@@ -3,7 +3,7 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
  require 'avm/eac_ubuntu_base0/instances/base'
5
5
  require 'avm/instances/docker_image'
6
- require 'avm/eac_redmine_base0/patches/object/template'
6
+ require 'eac_templates/core_ext'
7
7
 
8
8
  module Avm
9
9
  module EacRedmineBase0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
  end
@@ -0,0 +1,27 @@
1
+ export postgresql_database='%%DATABASE.NAME%%'
2
+ export postgresql_database_test='%%DATABASE.NAME%%_test'
3
+ export postgresql_user='%%DATABASE.USERNAME%%'
4
+ export postgresql_password='%%DATABASE.PASSWORD%%'
5
+ export postgresql_version='%%POSTGRESQL.VERSION%%'
6
+ export rvm_ruby='ruby-%%RUBY.VERSION%%'
7
+ export redmine_git_hosting_ssh_key_name=redmine_git_hosting_id
8
+ if [ '%%WEB.SCHEME%%' == 'https' ]; then
9
+ export address_https='true'
10
+ else
11
+ export address_https='false'
12
+ fi
13
+ export address_host='%%WEB.AUTHORITY%%'
14
+ export address_path='%%WEB.PATH%%'
15
+ export git_repositories_hierarchical_organisation=false
16
+
17
+ # Mail settings
18
+ export smtp_server='%%MAILER.SMTP.ADDRESS%%'
19
+ export smtp_port='%%MAILER.SMTP.PORT%%'
20
+ export smtp_domain='%%MAILER.SMTP.DOMAIN%%'
21
+ export smtp_tls='%%MAILER_SMTP_TLS%%'
22
+ export smtp_enable_starttls_auto='%%MAILER_SMTP_STARTTLS_AUTO%%'
23
+ export smtp_openssl_verify_mode='%%MAILER_SMTP_OPENSSL_VERIFY_MODE%%'
24
+ export smtp_authentication='%%MAILER.SMTP.AUTHENTICATION%%'
25
+ export smtp_username='%%MAILER.SMTP.USERNAME%%'
26
+ export smtp_password='%%MAILER.SMTP.PASSWORD%%'
27
+ export mail_from='%%MAILER.FROM%%'
@@ -0,0 +1,8 @@
1
+ development:
2
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
3
+
4
+ test:
5
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
6
+
7
+ production:
8
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,43 @@
1
+ FROM '%%base_image%%'
2
+ USER root
3
+ RUN apt-get update -y
4
+ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y sudo tzdata git apt-utils
5
+ RUN ln -fs /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
6
+ RUN dpkg-reconfigure --frontend noninteractive tzdata
7
+
8
+ # Redmine / Código-fonte
9
+ RUN echo '%%redmine_source_git_id%%' '%%redmine_user_home%%/redmine_source_git_id'
10
+ ADD '%%redmine_source_path%%' '%%redmine_path%%/'
11
+ RUN chown -R '%%redmine_user%%:%%redmine_user%%' '%%redmine_user_home%%'
12
+
13
+ # Redmine / Configuração de instalação
14
+ USER '%%redmine_user%%'
15
+ WORKDIR '%%redmine_user_home%%'
16
+ COPY install_settings.sh "%%redmine_path%%/config/install.sh"
17
+
18
+ # Redmine / Instalação
19
+ USER '%%redmine_user%%'
20
+ WORKDIR '%%redmine_user_home%%'
21
+ RUN SKIP_DATABASE='%%skip_database%%' \
22
+ '%%redmine_path%%/plugins/redmine_installer/installer/run.sh' '%%installer_target_task%%'
23
+
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
33
+
34
+ # Portas
35
+ EXPOSE 80/tcp 443/tcp 22/tcp
36
+
37
+ # Execução
38
+ COPY start.sh '%%start_path%%'
39
+ RUN /bin/chmod +x '%%start_path%%'
40
+ RUN /bin/chown '%%redmine_user%%:%%redmine_user%%' '%%start_path%%'
41
+ USER '%%redmine_user%%'
42
+ WORKDIR '%%redmine_user_home%%'
43
+ CMD '%%start_path%%'
@@ -0,0 +1,10 @@
1
+ <VirtualHost _default_:80>
2
+ DocumentRoot "%%redmine_path%%/public"
3
+ PassengerEnabled On
4
+
5
+ <Directory "%%redmine_path%%/public" >
6
+ Allow from all
7
+ Options -MultiViews
8
+ Require all granted
9
+ </Directory>
10
+ </VirtualHost>
@@ -0,0 +1,16 @@
1
+ <IfModule mod_ssl.c>
2
+ <VirtualHost _default_:443>
3
+ SSLEngine on
4
+ SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
5
+ SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
6
+
7
+ DocumentRoot "%%redmine_path%%/public"
8
+ PassengerEnabled On
9
+
10
+ <Directory "%%redmine_path%%/public" >
11
+ Allow from all
12
+ Options -MultiViews
13
+ Require all granted
14
+ </Directory>
15
+ </VirtualHost>
16
+ </IfModule>
@@ -0,0 +1,33 @@
1
+ # Database
2
+ export postgresql_internal='%%database_internal%%'
3
+ export postgresql_host='%%DATABASE.HOSTNAME%%'
4
+ export postgresql_port='%%DATABASE.PORT%%'
5
+ export postgresql_user='%%DATABASE.USERNAME%%'
6
+ export postgresql_password='%%DATABASE.PASSWORD%%'
7
+ export postgresql_database='%%DATABASE.NAME%%'
8
+ export postgresql_extra_settings='%%DATABASE.EXTRA%%'
9
+
10
+ # Git Hosting
11
+ export redmine_git_hosting_ssh_key_name=redmine_git_hosting_id
12
+ export git_repositories_hierarchical_organisation=false
13
+
14
+ # Web
15
+ if [ '%%WEB.SCHEME%%' == 'https' ]; then
16
+ export address_https='true'
17
+ else
18
+ export address_https='false'
19
+ fi
20
+ export address_host='%%WEB.AUTHORITY%%'
21
+ export address_path='%%WEB.PATH%%'
22
+
23
+ # Mail settings
24
+ export smtp_server='%%MAILER.SMTP.ADDRESS%%'
25
+ export smtp_port='%%MAILER.SMTP.PORT%%'
26
+ export smtp_domain='%%MAILER.SMTP.DOMAIN%%'
27
+ export smtp_tls='%%MAILER.SMTP.TLS%%'
28
+ export smtp_enable_starttls_auto='%%MAILER.SMTP.STARTTLS_AUTO%%'
29
+ export smtp_openssl_verify_mode='%%MAILER.SMTP.OPENSSL_VERIFY_MODE%%'
30
+ export smtp_authentication='%%MAILER.SMTP.AUTHENTICATION%%'
31
+ export smtp_username='%%MAILER.SMTP.USERNAME%%'
32
+ export smtp_password='%%MAILER.SMTP.PASSWORD%%'
33
+ export mail_from='%%MAILER.FROM%%'
@@ -0,0 +1,52 @@
1
+ #!/bin/bash
2
+
3
+ set -u
4
+ set -e
5
+
6
+ source '%%redmine_path%%/plugins/redmine_installer/installer/environment.sh'
7
+
8
+ function title() {
9
+ infom ">>>> $1 <<<<"
10
+ }
11
+
12
+ function redmine_install() {
13
+ title 'Installing Redmine...'
14
+ "$INSTALL_ROOT/run.sh" '%%installer_target_task%%'
15
+ }
16
+
17
+ function apache_start() {
18
+ title 'Restarting Apache HTTPD service...'
19
+ sudo service apache2 restart
20
+ }
21
+
22
+ function ssh_start() {
23
+ title 'Restarting SSH service...'
24
+ sudo service ssh restart
25
+ }
26
+
27
+ function postgresql_start() {
28
+ if bool_r "$SKIP_DATABASE"; then return 0; fi
29
+ if ! bool_r "$postgresql_internal"; then return 0; fi
30
+
31
+ title 'Restarting PostgresSQL service...'
32
+ sudo service postgresql restart
33
+ }
34
+
35
+ function request_http_interface() {
36
+ title 'Requesting web interface...'
37
+ wget 'http://localhost' &> /dev/null
38
+ }
39
+
40
+ function redmine_log() {
41
+ title 'Reading production log...'
42
+ LOG_FILE='%%redmine_path%%/log/production.log'
43
+ printf " * tail -f \"$LOG_FILE\":\n"
44
+ sudo tail -f "$LOG_FILE"
45
+ }
46
+
47
+ redmine_install
48
+ apache_start
49
+ ssh_start
50
+ postgresql_start
51
+ request_http_interface
52
+ 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.3.0
4
+ version: 0.3.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: 2021-11-12 00:00:00.000000000 Z
11
+ date: 2021-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm-eac_rails_base1
@@ -107,8 +107,14 @@ files:
107
107
  - lib/avm/eac_redmine_base0/deploy.rb
108
108
  - lib/avm/eac_redmine_base0/instance.rb
109
109
  - lib/avm/eac_redmine_base0/instances/docker_image.rb
110
- - lib/avm/eac_redmine_base0/patches/object/template.rb
111
110
  - lib/avm/eac_redmine_base0/version.rb
111
+ - template/avm/eac_redmine_base0/deploy/config/install.sh.template
112
+ - template/avm/eac_redmine_base0/deploy/config/secrets.yml
113
+ - template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template
114
+ - template/avm/eac_redmine_base0/instances/docker_image/apache_http_virtualhost.conf.template
115
+ - template/avm/eac_redmine_base0/instances/docker_image/apache_https_virtualhost.conf.template
116
+ - template/avm/eac_redmine_base0/instances/docker_image/install_settings.sh.template
117
+ - template/avm/eac_redmine_base0/instances/docker_image/start.sh.template
112
118
  homepage:
113
119
  licenses: []
114
120
  metadata: {}
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'eac_templates/patches/object/template'
5
-
6
- ::EacTemplates::Searcher.default.included_paths <<
7
- __dir__.to_pathname.expand_path.parent_n(5).join('template')