diff --git a/Dockerfile b/Dockerfile index df60785..0d03428 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,8 @@ RUN mkdir /unicopy \ && cp /app/config/docker-server.env /unicopy \ && cp /app/scripts/TestOracleConnection.java /unicopy \ && cp /app/scripts/TestMariadbConnection.java /unicopy \ - && cp /app/scripts/docker-entrypoint.sh /unicopy \ + && cp /app/scripts/container-entrypoint.sh /unicopy \ + && cp /app/scripts/container-healthcheck.sh /unicopy \ && cp /app/scripts/server-setup.sh /unicopy \ && cp /app/scripts/provided-setup.sh /unicopy \ && cp /app/scripts/app-setup.sh /unicopy \ @@ -45,7 +46,8 @@ RUN /update-certs-runner.sh ${CUSTOM_CRT_URL} \ && chsh -s /bin/bash jboss \ && /server-setup.sh /docker-server.env \ && rm -rf /opt/jboss/wildfly/standalone/configuration/standalone_xml_history -ENTRYPOINT ["/docker-entrypoint.sh"] +ENTRYPOINT ["/container-entrypoint.sh"] ENV ORACLE_DRIVER_PATH=$ORACLE_DRIVER_PATH ENV MARIADB_DRIVER_PATH=$MARIADB_DRIVER_PATH -USER ${RUN_USER} \ No newline at end of file +USER ${RUN_USER} +HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --start-interval=5s --retries=5 CMD /container-healthcheck.sh \ No newline at end of file diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..cbc9815 --- /dev/null +++ b/build.yaml @@ -0,0 +1,8 @@ +services: + wildfly: + extends: + file: compose.yaml + service: wildfly + build: + context: . + dockerfile: Dockerfile \ No newline at end of file diff --git a/compose.override.yaml b/compose.override.yaml new file mode 100644 index 0000000..5649980 --- /dev/null +++ b/compose.override.yaml @@ -0,0 +1,3 @@ +services: + keycloak: + image: jeffersonlab/wildfly:1.5.0 \ No newline at end of file diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..943e994 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,8 @@ +services: + wildfly: + hostname: wildfly + container_name: wildfly + ports: + - 8443:8443 + - 8080:8080 + - 9990:9990 diff --git a/scripts/docker-entrypoint.sh b/scripts/container-entrypoint.sh old mode 100755 new mode 100644 similarity index 100% rename from scripts/docker-entrypoint.sh rename to scripts/container-entrypoint.sh diff --git a/scripts/container-healthcheck.sh b/scripts/container-healthcheck.sh new file mode 100644 index 0000000..0534488 --- /dev/null +++ b/scripts/container-healthcheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +curl http://localhost:8080 -sf -o /dev/null \ No newline at end of file