File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,20 +30,26 @@ jobs:
3030 run : |
3131 docker build -t jeedom:bullseye --build-arg DEBIAN=bullseye --build-arg DATABASE=1 .
3232 - name : run jeedom:bullseye and check
33- # build current image for bullseye and check it
33+ # run current image for bullseye and check it
3434 run : |
3535 docker run -p 80:80 -d --rm --name jeedom_bullseye jeedom:bullseye
36- sleep 45
36+ until [ "`docker inspect -f {{.State.Health.Status}} jeedom_bullseye`" == "healthy" ]; do
37+ echo "waiting container to be healthy..."
38+ sleep 5;
39+ done;
3740 docker exec jeedom_bullseye php sick.php
3841 - name : Build jeedom:bookworm
3942 # build current image for bookworm
4043 run : |
4144 docker build -t jeedom:bookworm --build-arg DEBIAN=bookworm --build-arg DATABASE=1 .
4245 - name : run jeedom:bookworm and check
43- # build current image for bookworm and check it
46+ # run current image for bookworm and check it
4447 run : |
4548 docker run -p 81:80 -d --rm --name jeedom_bookworm jeedom:bookworm
46- sleep 45
49+ until [ "`docker inspect -f {{.State.Health.Status}} jeedom_bookworm`" == "healthy" ]; do
50+ echo "waiting container to be healthy..."
51+ sleep 5;
52+ done;
4753 docker exec jeedom_bookworm php sick.php
4854
4955 - name : Clean docker image
Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ RUN echo >${WEBSERVER_HOME}/initialisation
6262WORKDIR ${WEBSERVER_HOME}
6363EXPOSE 80
6464EXPOSE 443
65+
66+ # check if apache is running
67+ HEALTHCHECK --interval=1m --timeout=3s --retries=5 --start-period=10s --start-interval=5s \
68+ CMD curl -f http://localhost/ || exit 1
69+
6570COPY --chown=root:root --chmod=550 install/OS_specific/Docker/init.sh /root/
6671COPY --chown=root:root --chmod=550 install/bashrc /root/.bashrc
6772CMD ["bash" , "/root/init.sh" ]
You can’t perform that action at this time.
0 commit comments