mirror of
https://github.com/valitydev/bouncer.git
synced 2024-11-06 02:15:18 +00:00
9004e3fe50
Co-authored-by: Andrey Fadeev <me@ciiol.net>
25 lines
950 B
Bash
Executable File
25 lines
950 B
Bash
Executable File
#!/bin/bash
|
|
cat <<EOF
|
|
FROM $BASE_IMAGE
|
|
LABEL maintainer="Andrey Mayorov <a.mayorov@rbkmoney.com>"
|
|
RUN mkdir -p /var/log/bouncer
|
|
COPY ./_build/prod/rel/bouncer /opt/bouncer
|
|
WORKDIR /opt/bouncer
|
|
CMD /opt/bouncer/bin/bouncer foreground
|
|
EXPOSE 8022
|
|
LABEL com.rbkmoney.$SERVICE_NAME.parent=$BASE_IMAGE_NAME \
|
|
com.rbkmoney.$SERVICE_NAME.parent_tag=$BASE_IMAGE_TAG \
|
|
com.rbkmoney.$SERVICE_NAME.build_img=build \
|
|
com.rbkmoney.$SERVICE_NAME.build_img_tag=$BUILD_IMAGE_TAG \
|
|
com.rbkmoney.$SERVICE_NAME.commit_id=$(git rev-parse HEAD) \
|
|
com.rbkmoney.$SERVICE_NAME.commit_number=$(git rev-list --count HEAD) \
|
|
com.rbkmoney.$SERVICE_NAME.branch=$( \
|
|
if [ "HEAD" != $(git rev-parse --abbrev-ref HEAD) ]; then \
|
|
echo $(git rev-parse --abbrev-ref HEAD); \
|
|
elif [ -n "$BRANCH_NAME" ]; then \
|
|
echo $BRANCH_NAME; \
|
|
else \
|
|
echo $(git name-rev --name-only HEAD); \
|
|
fi)
|
|
EOF
|