Sha256: bb3e857917a08dc65a2e4f58885ea0d99f19e472f93eb2082c7954578eab4715
Contents?: true
Size: 1.19 KB
Versions: 12
Compression:
Stored size: 1.19 KB
Contents
# frozen_string_literal: true require 'eac_ruby_utils/core_ext' require 'avm/instances/docker_image' require 'avm/eac_redmine_base0/patches/object/template' module Avm module EacRedmineBase0 module Instances class DockerImage < ::Avm::Instances::DockerImage enable_simple_cache REDMINE_SOURCE_HOST_SUBPATH = 'redmine_source' def avm_fs_cache_object_id instance.id end def redmine_user 'redmine' end def redmine_user_home "/home/#{redmine_user}" end def redmine_path "#{redmine_user_home}/redmine_app" end def start_path '/start.sh' end private def git_repo_uncached ::EacGit::Local.new(instance.source_instance.fs_path) end def redmine_source_git_id git_repo.rev_parse('HEAD') end def redmine_source_path_uncached r = provide_dir.join(REDMINE_SOURCE_HOST_SUBPATH) ::FileUtils.rm_rf(r.to_path) r.mkpath git_repo.commit(redmine_source_git_id).archive_to_dir(r).system! REDMINE_SOURCE_HOST_SUBPATH end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems