Skip to content

Commit

Permalink
PMM-12641 Cleanup server build scripts (#3217)
Browse files Browse the repository at this point in the history
* PMM-12641 Improve server build scripts

* PMM-12641 remove `pmm_running_in_docker` ansible vars
  • Loading branch information
ademidoff authored Oct 9, 2024
1 parent 5e6fc13 commit 44e840f
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions build/docker/server/Dockerfile.el9
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ ENV LC_ALL=en_US.utf8
ENV GF_PLUGIN_DIR=/srv/grafana/plugins
ENV PS1="[\u@\h \W] # "

LABEL org.opencontainers.image.created ${BUILD_DATE}
LABEL org.opencontainers.image.licenses AGPL-3.0
LABEL org.opencontainers.image.title Percona Monitoring and Management
LABEL org.opencontainers.image.vendor Percona LLC
LABEL org.opencontainers.image.version ${VERSION}

EXPOSE 8080 8443

WORKDIR /opt

RUN microdnf -y install epel-release && \
Expand All @@ -36,12 +28,23 @@ COPY gitCommit /tmp/gitCommit
COPY pmm-client.tar.gz /tmp/

RUN install -T -p -m 644 /opt/ansible/ansible.cfg /etc/ansible/ansible.cfg && \
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/main.yml -e "pmm_running_in_docker=true" && \
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/update.yml -e "pmm_running_in_docker=true" && \
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm/post-build-actions.yml -e "pmm_running_in_docker=true"
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/main.yml && \
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm-docker/update.yml && \
ansible-playbook -vvv -i 'localhost,' -c local /opt/ansible/pmm/post-build-actions.yml && \
sed -i '/^assumeyes/d' /etc/dnf/dnf.conf

LABEL org.opencontainers.image.created ${BUILD_DATE}
LABEL org.opencontainers.image.licenses AGPL-3.0
LABEL org.opencontainers.image.title Percona Monitoring and Management
LABEL org.opencontainers.image.vendor Percona LLC
LABEL org.opencontainers.image.version ${VERSION}

USER pmm

VOLUME [ "/srv" ]

EXPOSE 8080 8443

HEALTHCHECK --interval=3s --timeout=2s --start-period=10s --retries=3 CMD curl -sf http://127.0.0.1:8080/v1/server/readyz

CMD ["/opt/entrypoint.sh"]

0 comments on commit 44e840f

Please sign in to comment.