mirror of
https://github.com/valitydev/url-shortener.git
synced 2024-11-06 01:55:19 +00:00
Test probot settings config (#19)
This commit is contained in:
parent
7c6d047411
commit
3b7de13b80
46
.github/settings.yml
vendored
Normal file
46
.github/settings.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
|
||||
_extends: .github
|
||||
|
||||
teams:
|
||||
- name: devs
|
||||
permission: push
|
||||
- name: bots
|
||||
permission: push
|
||||
- name: maintainers
|
||||
permission: push
|
||||
- name: erlang
|
||||
permission: maintain
|
||||
|
||||
branches:
|
||||
- name: "master"
|
||||
# https://developer.github.com/v3/repos/branches/#update-branch-protection
|
||||
# Branch Protection settings. Set to null to disable
|
||||
protection:
|
||||
required_pull_request_reviews:
|
||||
required_approving_review_count: 1
|
||||
dismiss_stale_reviews: false
|
||||
require_code_owner_reviews: true
|
||||
dismissal_restrictions: {}
|
||||
required_status_checks:
|
||||
strict: true
|
||||
checks:
|
||||
- context: "Load .env"
|
||||
app_id: 15368
|
||||
- context: "Run checks / Build"
|
||||
app_id: 15368
|
||||
- context: "Run checks / Check"
|
||||
app_id: 15368
|
||||
- context: "Run checks / Dialyze"
|
||||
app_id: 15368
|
||||
- context: "Run checks / Test"
|
||||
app_id: 15368
|
||||
- context: "codecov/patch"
|
||||
app_id: 254
|
||||
- context: "codecov/project"
|
||||
app_id: 254
|
||||
enforce_admins: false
|
||||
required_conversation_resolution: false
|
||||
required_linear_history: true
|
||||
restrictions: null
|
||||
allow_force_pushes: false
|
||||
allow_deletions: false
|
14
Dockerfile
14
Dockerfile
@ -2,10 +2,10 @@ ARG OTP_VERSION
|
||||
|
||||
# Build the release
|
||||
FROM docker.io/library/erlang:${OTP_VERSION} AS builder
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Install thrift compiler
|
||||
ARG THRIFT_VERSION
|
||||
|
||||
ARG TARGETARCH
|
||||
RUN wget -q -O- "https://github.com/valitydev/thrift/releases/download/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}-linux-${TARGETARCH}.tar.gz" \
|
||||
| tar -xvz -C /usr/local/bin/
|
||||
@ -16,8 +16,8 @@ COPY . /build/
|
||||
|
||||
# Build the release
|
||||
WORKDIR /build
|
||||
RUN rebar3 compile
|
||||
RUN rebar3 as prod release
|
||||
RUN rebar3 compile && \
|
||||
rebar3 as prod release
|
||||
|
||||
# Make a runner image
|
||||
FROM docker.io/library/erlang:${OTP_VERSION}-slim
|
||||
@ -28,15 +28,15 @@ ARG SERVICE_NAME
|
||||
ENV CHARSET=UTF-8
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
# Expose SERVICE_NAME as env so CMD expands properly on start
|
||||
ENV SERVICE_NAME=${SERVICE_NAME}
|
||||
|
||||
# Set runtime
|
||||
WORKDIR /opt/${SERVICE_NAME}
|
||||
|
||||
COPY --from=builder /build/_build/prod/rel/${SERVICE_NAME} /opt/${SERVICE_NAME}
|
||||
|
||||
RUN echo "#!/bin/sh" >> /entrypoint.sh && \
|
||||
echo "exec /opt/${SERVICE_NAME}/bin/${SERVICE_NAME} foreground" >> /entrypoint.sh && \
|
||||
chmod +x /entrypoint.sh
|
||||
ENTRYPOINT []
|
||||
CMD /opt/${SERVICE_NAME}/bin/${SERVICE_NAME} foreground
|
||||
CMD ["/entrypoint.sh"]
|
||||
|
||||
EXPOSE 8022
|
||||
|
@ -1,13 +1,17 @@
|
||||
ARG OTP_VERSION
|
||||
|
||||
FROM docker.io/library/erlang:${OTP_VERSION}
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Install thrift compiler
|
||||
ARG THRIFT_VERSION
|
||||
ARG BUILDARCH
|
||||
|
||||
RUN wget -q -O- "https://github.com/valitydev/thrift/releases/download/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}-linux-${BUILDARCH}.tar.gz" \
|
||||
ARG TARGETARCH
|
||||
RUN wget -q -O- "https://github.com/valitydev/thrift/releases/download/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}-linux-${TARGETARCH}.tar.gz" \
|
||||
| tar -xvz -C /usr/local/bin/
|
||||
|
||||
# Set env
|
||||
ENV CHARSET=UTF-8
|
||||
ENV LANG=C.UTF-8
|
||||
CMD /bin/bash
|
||||
|
||||
# Set runtime
|
||||
CMD ["/bin/bash"]
|
||||
|
Loading…
Reference in New Issue
Block a user