Skip to content

Commit

Permalink
Support M1 chip (#2253)
Browse files Browse the repository at this point in the history
  • Loading branch information
clementbolin authored Jan 20, 2022
1 parent 99c8a40 commit 67a6d40
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 18 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,14 @@ Check our [contributing documentation](./CONTRIBUTING.md) to know about our codi
## License

Kuzzle is published under [Apache 2 License](./LICENSE.md).

## About Mac M1

First of all make sure that you have at least `4GB` of ram allocated to your vm **docker desktop** and that it is running.

Run the following command to install all the dependencies in your container:
```bash
npm run docker:install
```

finally run the command `docker-compose up` to launch your kuzzle stack.
61 changes: 44 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ x-kuzzle-config: &kuzzle-config
image: kuzzleio/core-dev:2
command: sh -c 'chmod 755 /run-dev.sh && /run-dev.sh'
volumes:
- ".:/var/app"
- "./docker/scripts/run-dev.sh:/run-dev.sh"
- "./docker/fixtures:/fixtures"
- '.:/var/app'
- './docker/scripts/run-dev.sh:/run-dev.sh'
- './docker/fixtures:/fixtures'
cap_add:
- SYS_PTRACE
ulimits:
nofile: 65536
sysctls:
- net.core.somaxconn=8192
depends_on:
- redis
- elasticsearch
redis:
condition: service_healthy
elasticsearch:
condition: service_healthy
environment:
- kuzzle_services__storageEngine__client__node=http://elasticsearch:9200
- kuzzle_services__storageEngine__commonMapping__dynamic=true
Expand Down Expand Up @@ -49,44 +51,69 @@ services:
- kuzzle_node_2
- kuzzle_node_3
ports:
- "7512:7512"
- '7512:7512'
volumes:
- ./docker/nginx-dev:/etc/nginx/conf.d

kuzzle_node_1:
<<: *kuzzle-config
container_name: kuzzle_node_1
ports:
- "17510:7512" # Kuzzle API port
- "1883:1883" # Kuzzle MQTT port
- "9229:9229" # Debug port
- '17510:7512' # Kuzzle API port
- '1883:1883' # Kuzzle MQTT port
- '9229:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
timeout: 1s
interval: 2s
retries: 10

kuzzle_node_2:
<<: *kuzzle-config
container_name: kuzzle_node_2
ports:
- "17511:7512" # Kuzzle API port
- "11883:1883" # Kuzzle MQTT port
- "9230:9229" # Debug port
- '17511:7512' # Kuzzle API port
- '11883:1883' # Kuzzle MQTT port
- '9230:9229' # Debug port
healthcheck:
test: ['CMD', 'curl', '-f', 'http://kuzzle:7512/_healthCheck']
timeout: 1s
interval: 2s
retries: 10

kuzzle_node_3:
<<: *kuzzle-config
container_name: kuzzle_node_3
ports:
- "17512:7512" # Kuzzle API port
- "11884:1883" # Kuzzle MQTT port
- "9231:9229" # Debug port
- '17512:7512' # Kuzzle API port
- '11884:1883' # Kuzzle MQTT port
- '9231:9229' # Debug port
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"
- '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"
- '9200:9200'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9200']
interval: 2s
timeout: 2s
retries: 10
ulimits:
nofile: 65536
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"test:lint:ts:fix": "eslint --max-warnings=0 --fix ./lib --ext .ts --config .eslintc-ts.json",
"test:lint:js": "eslint --max-warnings=0 ./lib ./test ./features-legacy ./bin ./features ./doc/build-error-codes.js ./plugins/available/functional-test-plugin",
"test:lint:js:fix": "eslint --max-warnings=0 --fix ./lib ./test ./features-legacy ./bin ./features ./doc/build-error-codes.js",
"doc-error-codes": "node -r ts-node/register doc/build-error-codes"
"doc-error-codes": "node -r ts-node/register doc/build-error-codes",
"docker:install": "docker-compose run kuzzle_node_1 npm install"
},
"directories": {
"lib": "lib"
Expand Down

0 comments on commit 67a6d40

Please sign in to comment.