Skip to content

Commit dd24357

Browse files
committed
Improve Docker configuration in the package
1 parent fc77153 commit dd24357

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,17 @@ First of all, thank you for contributing to Meilisearch! The goal of this docume
2828

2929
### Setup <!-- omit in toc -->
3030

31-
We suggest using `yarn` as the lock file is in yarn and thus we ensure a working dev environment.
31+
You can set up your local environment natively or using `docker`, check out the [`docker-compose.yml`](/docker-compose.yml).
3232

33+
Example of running all the checks with docker:
3334
```bash
34-
yarn
35+
docker-compose run --rm package bash -c "yarn install && yarn test && yarn playground:build && yarn style"
36+
```
37+
38+
To install dependencies:
39+
40+
```bash
41+
yarn --dev
3542
```
3643

3744
### Tests and Linter <!-- omit in toc -->

docker-compose.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: "3.8"
2+
3+
services:
4+
package:
5+
image: node:16
6+
tty: true
7+
stdin_open: true
8+
working_dir: /home/package
9+
environment:
10+
- MEILISEARCH_HOST=http://meilisearch:7700
11+
depends_on:
12+
- meilisearch
13+
links:
14+
- meilisearch
15+
volumes:
16+
- ./:/home/package
17+
18+
meilisearch:
19+
image: getmeili/meilisearch:latest
20+
ports:
21+
- "7700"
22+
environment:
23+
- MEILI_MASTER_KEY=masterKey
24+
- MEILI_NO_ANALYTICS=true

0 commit comments

Comments
 (0)