fix: pin alpine version to 3.18 and add healthchecks

This commit is contained in:
Rainer Killinger
2024-03-06 11:45:40 +01:00
parent d36d9596fc
commit 689ac68be3
7 changed files with 17 additions and 3 deletions

View File

@@ -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

View File

@@ -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"]

View File

@@ -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"]

View File

@@ -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

View File

@@ -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

View File

@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:18-alpine3.18
RUN apk update && apk add git curl jq && mkdir -p /opt

View File

@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:18-alpine3.18
RUN apk update && apk add git jq curl python3 build-base