Skip to content

Commit

Permalink
Merge pull request #2480 from kuzzleio/chore/update-node18
Browse files Browse the repository at this point in the history
Update doco, scripts, dockerfile to nodejs 18
  • Loading branch information
rolljee authored Sep 20, 2023
2 parents 2ee7d41 + c15cf43 commit 9e8884c
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .ci/scripts/run-monkey-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -ex

if [ -z "$NODE_VERSION" ];
then
echo "Missing NODE_VERSION, use default NODE_16_VERSION"
export NODE_VERSION=$NODE_16_VERSION
echo "Missing NODE_VERSION, use default NODE_18_VERSION"
export NODE_VERSION=$NODE_18_VERSION
fi

echo "Testing Kuzzle against node v$NODE_VERSION"
Expand Down
4 changes: 2 additions & 2 deletions .ci/scripts/run-test-arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -ex

if [ -z "$NODE_VERSION" ];
then
echo "Missing NODE_VERSION, use default NODE_16_VERSION"
NODE_VERSION=$NODE_16_VERSION
echo "Missing NODE_VERSION, use default NODE_18_VERSION"
NODE_VERSION=$NODE_18_VERSION
fi

echo "Testing Kuzzle against node v$NODE_VERSION"
Expand Down
4 changes: 2 additions & 2 deletions .ci/scripts/run-test-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -ex

if [ -z "$NODE_VERSION" ];
then
echo "Missing NODE_VERSION, use default NODE_16_VERSION"
export NODE_VERSION=$NODE_16_VERSION
echo "Missing NODE_VERSION, use default NODE_18_VERSION"
export NODE_VERSION=$NODE_18_VERSION
fi

echo "Testing Kuzzle against node v$NODE_VERSION"
Expand Down
4 changes: 2 additions & 2 deletions .ci/scripts/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -ex

if [ -z "$NODE_VERSION" ];
then
echo "Missing NODE_VERSION, use default NODE_16_VERSION"
NODE_VERSION=$NODE_16_VERSION
echo "Missing NODE_VERSION, use default NODE_18_VERSION"
NODE_VERSION=$NODE_18_VERSION
fi

echo "Testing Kuzzle against node v$NODE_VERSION"
Expand Down
2 changes: 1 addition & 1 deletion doc/2/api/controllers/server/health-check/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Returns the status of Kuzzle and it's internal services.
### HTTP

```http
URL: http://kuzzle:7512/_healthCheck[?services]
URL: http://kuzzle:7512/_healthcheck[?services]
Method: GET
```

Expand Down
8 changes: 3 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ x-kuzzle-config: &kuzzle-config
- KUZZLE_VAULT_KEY=${KUZZLE_VAULT_KEY:-secret-password}
- KUZZLE_SECRETS_FILE=${KUZZLE_SECRETS_FILE:-/var/app/features/fixtures/secrets.enc.json}
# Variables used by the development scripts
- NODE_12_VERSION=12.20.0
- NODE_14_VERSION=14.17.0
- NODE_16_VERSION=16.19.1
- NODE_18_VERSION=18.17.0
- NODE_20_VERSION=20.0.0
Expand Down Expand Up @@ -65,7 +63,7 @@ services:
- '1883:1883' # Kuzzle MQTT port
- '9229:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthcheck']
timeout: 1s
interval: 2s
retries: 10
Expand All @@ -78,7 +76,7 @@ services:
- '11883:1883' # Kuzzle MQTT port
- '9230:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthcheck']
timeout: 1s
interval: 2s
retries: 10
Expand All @@ -91,7 +89,7 @@ services:
- '11884:1883' # Kuzzle MQTT port
- '9231:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthcheck']
timeout: 1s
interval: 2s
retries: 10
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose-swarm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ services:
sysctls:
- net.core.somaxconn=8192
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7512/_healthCheck"]
test: ["CMD", "curl", "-f", "http://localhost:7512/_healthcheck"]
timeout: 1s
interval: 2s
retries: 30
Expand All @@ -47,7 +47,7 @@ services:
- "traefik.enable=true"
# Kuzzle HTTP/WS
- "traefik.http.services.kuzzle_http.loadbalancer.server.port=7512"
- "traefik.http.services.kuzzle_http.loadbalancer.healthCheck.path=/_healthCheck"
- "traefik.http.services.kuzzle_http.loadbalancer.healthCheck.path=/_healthcheck"
- "traefik.http.services.kuzzle_http.loadbalancer.healthCheck.interval=5s"
- "traefik.http.routers.kuzzle.entrypoints=kuzzle_http"
- "traefik.http.routers.kuzzle.rule=Host(`localhost`)"
Expand Down
4 changes: 2 additions & 2 deletions docker/images/kuzzle/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
# Production build image
################################################################################
FROM node:16-bullseye-slim as builder
FROM node:18-bullseye-slim as builder

RUN set -x \
&& apt-get update \
Expand Down Expand Up @@ -45,7 +45,7 @@ RUN set -x \
################################################################################
# Production build 2 image
################################################################################
FROM node:16-bullseye-slim as minifier
FROM node:18-bullseye-slim as minifier

ENV NODE_ENV=production

Expand Down
2 changes: 1 addition & 1 deletion docker/images/kuzzle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You should use this image as a base build your own application:

```dockerfile
# Build image
FROM node:12.18.1-alpine3.11 as builder
FROM node:18-bullseye-slim as builder

ADD . /your-plugin-name

Expand Down
2 changes: 1 addition & 1 deletion docker/images/plugin-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
# Plugin development build image
################################################################################
FROM node:16-bullseye-slim as builder
FROM node:18-bullseye-slim as builder

RUN set -x \
&& apt-get update && apt-get install -y \
Expand Down
22 changes: 22 additions & 0 deletions docker/images/plugin-dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ version: '3'
services:
kuzzle:
image: kuzzleio/plugin-dev:2
container_name: kuzzle_node
volumes:
- ".:/var/app/plugins/enabled/your-plugin-name"
cap_add:
Expand All @@ -40,12 +41,33 @@ services:
- DEBUG=kuzzle:plugins
# Customize here
- KUZZLE_PLUGIN_NAME=your-plugin-name
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthcheck']
timeout: 1s
interval: 2s
retries: 10

redis:
image: redis:6
container_name: kuzzle_redis
ports:
- '6379:6379'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 1s
timeout: 3s
retries: 30

elasticsearch:
image: kuzzleio/elasticsearch:7
container_name: kuzzle_elasticsearch
ports:
- '9200:9200'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9200']
interval: 2s
timeout: 2s
retries: 10
ulimits:
nofile: 65536
```
Expand Down
11 changes: 6 additions & 5 deletions docker/scripts/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ x-kuzzle-config: &kuzzle-config
- KUZZLE_VAULT_KEY=${KUZZLE_VAULT_KEY:-secret-password}
- KUZZLE_SECRETS_FILE=${KUZZLE_SECRETS_FILE:-/var/app/features/fixtures/secrets.enc.json}
# Variables used by the development scripts
- NODE_12_VERSION=12.20.0
- NODE_14_VERSION=14.17.0
- NODE_16_VERSION=16.19.1
- NODE_18_VERSION=18.17.0
- NODE_20_VERSION=20.0.0
- WITHOUT_KUZZLE # Run only Elasticsearch and Redis
- REBUILD # Force a rebuild of npm modules

Expand All @@ -63,7 +64,7 @@ services:
- '1883:1883' # Kuzzle MQTT port
- '9229:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthcheck']
timeout: 1s
interval: 2s
retries: 10
Expand All @@ -76,7 +77,7 @@ services:
- '11883:1883' # Kuzzle MQTT port
- '9230:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthcheck']
timeout: 1s
interval: 2s
retries: 10
Expand All @@ -89,7 +90,7 @@ services:
- '11884:1883' # Kuzzle MQTT port
- '9231:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthcheck']
timeout: 1s
interval: 2s
retries: 10
Expand Down
4 changes: 2 additions & 2 deletions docker/scripts/run-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ fi

if [ -z "$NODE_VERSION" ];
then
echo "Missing NODE_VERSION, use default $NODE_14_VERSION"
n $NODE_14_VERSION
echo "Missing NODE_VERSION, use default $NODE_18_VERSION"
n $NODE_18_VERSION
fi

if [ -n "$TRAVIS" ] || [ -n "$REBUILD" ]; then
Expand Down
4 changes: 2 additions & 2 deletions docker/scripts/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ fi

if [ -z "$NODE_VERSION" ];
then
echo "Missing NODE_VERSION, use default $NODE_14_VERSION"
n $NODE_14_VERSION
echo "Missing NODE_VERSION, use default $NODE_18_VERSION"
n $NODE_18_VERSION
fi

if [ -n "$TRAVIS" ] || [ -n "$REBUILD" ]; then
Expand Down

0 comments on commit 9e8884c

Please sign in to comment.