mirror of
https://github.com/maplibre/martin.git
synced 2024-12-19 04:41:46 +03:00
Update and fix demo (#809)
* Use `postgis/postgis` image for the DB * Build frontend image inside the docker * Upgrade all packages except styled-components - that one causes some errors * Add yarn.lock to the repo * Add justfile for simplicity * Bump martin docker image version in a few places
This commit is contained in:
parent
d85d95d582
commit
fa50eeac97
@ -1,13 +1,9 @@
|
|||||||
# Martin Use Case
|
# Martin Use Case
|
||||||
|
|
||||||
## Usage
|
## Usage in Docker-Compose
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker-compose up
|
just up
|
||||||
```
|
```
|
||||||
|
|
||||||
Open `localhost` in your browser
|
* Open http://localhost in your browser
|
||||||
|
|
||||||
# Requirements
|
|
||||||
|
|
||||||
Frontend requires [martin v0.6.2](https://github.com/maplibre/martin/tree/v0.6.2)
|
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
FROM postgres:12
|
FROM postgis/postgis:15-3.3
|
||||||
|
|
||||||
ENV PG_MAJOR=12
|
|
||||||
ENV POSTGIS_MAJOR=3
|
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
|
|
||||||
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
|
|
||||||
wget \
|
wget \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
unzip \
|
unzip \
|
||||||
|
@ -6,7 +6,6 @@ services:
|
|||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ["npm", "run", "preview"]
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- tiles
|
- tiles
|
||||||
ports:
|
ports:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM node:20-alpine as builder
|
FROM node:alpine as builder
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
@ -7,4 +7,6 @@ COPY yarn.lock .
|
|||||||
RUN yarn install
|
RUN yarn install
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
CMD yarn run build
|
RUN yarn run build
|
||||||
|
|
||||||
|
CMD ["yarn", "run", "preview"]
|
||||||
|
@ -14,24 +14,26 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"date-fns": "^2.30.0",
|
"date-fns": "^2.30.0",
|
||||||
"debounce": "1.2.1",
|
"debounce": "1.2.1",
|
||||||
"mapbox-gl": "npm:empty-npm-package@^1.0.0",
|
"maplibre-gl": "^3.3.0",
|
||||||
"maplibre-gl": "^3.2.0",
|
|
||||||
"normalize.css": "8.0.1",
|
"normalize.css": "8.0.1",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-day-picker": "^8.8.0",
|
"react-day-picker": "^8.7.1",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-map-gl": "^7.1.2",
|
"react-map-gl": "^7.1.0",
|
||||||
"react-scroll-parallax": "3.4.2",
|
"react-scroll-parallax": "3.4.2",
|
||||||
"styled-components": "5.3.11"
|
"styled-components": "5.3.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.4.2",
|
"@types/node": "^20.5.0",
|
||||||
"@types/react": "^18.2.15",
|
"@types/react": "^18.2.20",
|
||||||
"@types/react-dom": "^18.2.7",
|
"@types/react-dom": "^18.2.7",
|
||||||
"@vitejs/plugin-react": "^4.0.3",
|
"@vitejs/plugin-react": "^4.0.4",
|
||||||
|
"eslint": "8.47.0",
|
||||||
"eslint-config-airbnb": "19.0.4",
|
"eslint-config-airbnb": "19.0.4",
|
||||||
|
"eslint-config-airbnb-base": "15.0.0",
|
||||||
|
"eslint-config-react-app": "7.0.1",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vite": "^4.4.4",
|
"vite": "^4.4.9",
|
||||||
"vite-plugin-mkcert": "^1.16.0",
|
"vite-plugin-mkcert": "^1.16.0",
|
||||||
"vite-tsconfig-paths": "^4.2.0"
|
"vite-tsconfig-paths": "^4.2.0"
|
||||||
},
|
},
|
||||||
|
File diff suppressed because it is too large
Load Diff
21
demo/justfile
Normal file
21
demo/justfile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env just --justfile
|
||||||
|
|
||||||
|
set shell := ["bash", "-c"]
|
||||||
|
|
||||||
|
@_default:
|
||||||
|
just --list --unsorted
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf frontend/node_modules
|
||||||
|
|
||||||
|
up:
|
||||||
|
docker-compose up
|
||||||
|
|
||||||
|
up-build:
|
||||||
|
docker-compose up --build
|
||||||
|
|
||||||
|
up-backend:
|
||||||
|
docker-compose up db tiles --detach
|
||||||
|
|
||||||
|
frontend *ARGS:
|
||||||
|
docker-compose up frontend {{ ARGS }}
|
@ -2,7 +2,7 @@ version: "3"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
martin:
|
martin:
|
||||||
image: ghcr.io/maplibre/martin:v0.7.0
|
image: ghcr.io/maplibre/martin:v0.8.7
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
|
@ -7,7 +7,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
martin:
|
martin:
|
||||||
image: ghcr.io/maplibre/martin:v0.7.0
|
image: ghcr.io/maplibre/martin:v0.8.7
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
|
Loading…
Reference in New Issue
Block a user