소스 검색

Create OTP_VERSION file by `mix release`

contrib/munin-healthcheck
kPherox 4 년 전
부모
커밋
0e8f6d24b8
No known key found for this signature in database GPG 키 ID: C04751C2BFA2F62D
2개의 변경된 파일10개의 추가작업 그리고 3개의 파일을 삭제
  1. +0
    -2
      Dockerfile
  2. +10
    -1
      mix.exs

+ 0
- 2
Dockerfile 파일 보기

@@ -12,8 +12,6 @@ RUN apk add git gcc g++ musl-dev make &&\
mkdir release &&\
mix release --path release

RUN echo "${OTP_VERSION}" > release/OTP_VERSION

FROM alpine:3.11

ARG BUILD_DATE


+ 10
- 1
mix.exs 파일 보기

@@ -37,12 +37,21 @@ defmodule Pleroma.Mixfile do
pleroma: [
include_executables_for: [:unix],
applications: [ex_syslogger: :load, syslog: :load],
steps: [:assemble, &copy_files/1, &copy_nginx_config/1]
steps: [:assemble, &put_files/1, &copy_files/1, &copy_nginx_config/1]
]
]
]
end

def put_files(%{path: target_path} = release) do
File.write!(
Path.join([target_path, "OTP_VERSION"]),
Pleroma.OTPVersion.version()
)

release
end

def copy_files(%{path: target_path} = release) do
File.cp_r!("./rel/files", target_path)
release


불러오는 중...
취소
저장