123456789101112131415161718192021222324 |
- FROM registry.sdsys.ru/build-image:alpine-3.10-1 as build
- ARG branch=release
- ARG gradle_version=5.2.1
- COPY id_rsa /root/.ssh
- RUN export GRADLE_HOME=/opt/gradle/gradle-${gradle_version} \
- && export PATH=${GRADLE_HOME}/bin:${PATH} \
- && gradle -v \
- && printf "Host git.alfatell.ru \n\tStrictHostKeyChecking no" > /root/.ssh/config \
- && git clone git@github.com:icruportal/web-registration.git \
- && cd web-registration-cloud && git checkout ${branch} \
- && echo $(git log -p -1 --pretty=format:"%h"|head -n1) > /tmp/version && cd customer-api \
- && mvn clean install && cd ../promo/ \
- && figlet -c Building Promo \
- && gradle tasks bootWar \
- && rm -rf /root/.ssh/id_rsa
- FROM registry.sdsys.ru/iru/iru-base:7.6
- ARG DB_CLUSTER=mongodb1:27017,mongodb2:27018,mongodb3:27019
- ARG SERVER_PORT=9000
-
- HEALTHCHECK --start-period=30s --interval=15s --timeout=5s --retries=2 CMD curl -f 127.0.0.1:${SERVER_PORT} || exit 1
- COPY --from=build /web-registration-cloud/promo/build/libs/promo-0.0.1-SNAPSHOT.war /opt/
- COPY --from=build /tmp/version /tmp/
- CMD ["java", "-jar", "/opt/promo-0.0.1-SNAPSHOT.war"]
|