diff --git a/.changeset/fair-monkeys-tickle.md b/.changeset/fair-monkeys-tickle.md new file mode 100644 index 00000000..83b8ca4a --- /dev/null +++ b/.changeset/fair-monkeys-tickle.md @@ -0,0 +1,9 @@ +--- +"@openstapps/node-builder": patch +"@openstapps/database": patch +"@openstapps/node-base": patch +"@openstapps/backend": patch +"@openstapps/app": patch +--- + +pin alpine version to 3.18 and add healthchecks diff --git a/backend/backend/Dockerfile b/backend/backend/Dockerfile index 6502b7af..8a1f165f 100644 --- a/backend/backend/Dockerfile +++ b/backend/backend/Dockerfile @@ -9,4 +9,6 @@ ENV NODE_ENV=production WORKDIR /app EXPOSE 3000 +HEALTHCHECK --interval=10s --timeout=10s --start-period=10s --retries=12 CMD curl -s --fail --request POST --data '{}' --header 'Content-Type: application/json' http://localhost:3000/ >/dev/null || exit 1 + ENTRYPOINT ["node", "app.js"] diff --git a/backend/database/Dockerfile b/backend/database/Dockerfile index defd70e5..c3bf9cee 100644 --- a/backend/database/Dockerfile +++ b/backend/database/Dockerfile @@ -14,4 +14,6 @@ RUN chown elasticsearch:elasticsearch config/elasticsearch.yml USER elasticsearch +HEALTHCHECK --interval=10s --timeout=10s --start-period=60s --retries=12 CMD curl --fail -s http://localhost:9200/ >/dev/null || exit 1 + CMD ["/usr/share/elasticsearch/bin/elasticsearch"] diff --git a/backend/database/config/elasticsearch.yml b/backend/database/config/elasticsearch.yml index dbae1e8b..e22f39ff 100644 --- a/backend/database/config/elasticsearch.yml +++ b/backend/database/config/elasticsearch.yml @@ -3,3 +3,4 @@ discovery.type: "single-node" cluster.routing.allocation.disk.threshold_enabled: false network.bind_host: 0.0.0.0 xpack.security.enabled: false +ingest.geoip.downloader.enabled: false \ No newline at end of file diff --git a/frontend/app/Dockerfile b/frontend/app/Dockerfile index 615d4e66..6f826233 100644 --- a/frontend/app/Dockerfile +++ b/frontend/app/Dockerfile @@ -1,7 +1,7 @@ # Creates a docker image with only the app as an executable unit # Dependencies need to be installed beforehand # Needs to be build beforehand -FROM node:18-alpine +FROM node:18-alpine3.18 WORKDIR /app COPY www/ /app/www diff --git a/images/node-base/Dockerfile b/images/node-base/Dockerfile index 8201f020..f819fce0 100644 --- a/images/node-base/Dockerfile +++ b/images/node-base/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:18-alpine3.18 RUN apk update && apk add git curl jq && mkdir -p /opt diff --git a/images/node-builder/Dockerfile b/images/node-builder/Dockerfile index d50c8232..456508ae 100644 --- a/images/node-builder/Dockerfile +++ b/images/node-builder/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:18-alpine3.18 RUN apk update && apk add git jq curl python3 build-base