Skip to content

Commit

Permalink
fix after review 01
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-igonet committed Jul 19, 2024
1 parent 3a9a226 commit 5915500
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 12 deletions.
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,26 @@ Install headless-gl dependencies https://github.com/stackgl/headless-gl#windows
copy node_modules/headless-gl/deps/windows/dll/x64/*.dll c:\windows\system32
```

### Docker

#### Build the basic docker image

```shell
docker compose build
```

#### Start development mode

```shell
docker compose up dev
```

#### Run tests

```shell
docker compose up test
```

## Creating a Standalone Build

A standalone build allows you to turn the contents of this repository into `maplibre-gl.js` and `maplibre-gl.css` files that can be included on an html page.
Expand Down
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ FROM --platform=$BUILDPLATFORM node:lts-bookworm-slim

ARG DEBIAN_FRONTEND=noninteractive

RUN echo "hello world"

RUN apt-get update && apt-get install -y \
build-essential \
git \
Expand All @@ -24,10 +22,9 @@ RUN apt-get update && apt-get install -y \
libgif-dev \
&& rm -rf /var/lib/apt/lists/*

COPY ./ /maplibre-gl-js/

WORKDIR /maplibre-gl-js
RUN npm install
RUN npm run build-css
RUN npm run build-dev
CMD npm run watch-dev
COPY ./ /maplibre-gl-js/
RUN npm ci
RUN npm run build-dist
CMD npm run start
EXPOSE 9966
20 changes: 16 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
maplibre-gl-js:
dev:
privileged: true
platform: linux/amd64
image: localhost/maplibre-gl-js
Expand All @@ -8,8 +8,20 @@ services:
- "linux/amd64"
working_dir: /maplibre-gl-js
volumes:
- ./maplibre-gl-js/src/:/maplibre-gl-js/src/
- ./maplibre-gl-js/dist/:/maplibre-gl-js/dist/
- ./src/:/maplibre-gl-js/src/
- ./dist/:/maplibre-gl-js/dist/
ports:
- 9966:9966

test:
privileged: true
platform: linux/amd64
image: localhost/maplibre-gl-js
volumes:
- ./test/:/maplibre-gl-js/test/
command:
- npm run watch-dev
- /bin/bash
- -c
- |
npm run test-unit

0 comments on commit 5915500

Please sign in to comment.