Skip to content

Tram add unique ids #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20 as node_builder
FROM node:20 AS node_builder
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN yarn
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ version: "3.8"
services:
nginx:
build: ./
restart: always
ports:
- 80:8080
- 443:443
volumes:
- /etc/ssl:/etc/ssl:ro
- ./docker/nginx_conf.d/:/etc/nginx/conf.d/:ro
- ./docker/nginx_conf.d/:/etc/nginx/conf.d/:ro
9 changes: 9 additions & 0 deletions docker/data_processing_container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ WORKDIR /tmp/tippecanoe-src
RUN make \
&& make install

# Copy scripts and extract pmtiles
COPY scripts /scripts
COPY pwa_config /pwa_config
RUN ls -al /scripts
COPY scripts /scripts
RUN cd /scripts && npm install
COPY pwa_config /pwa_config


# Remove the temp directory and unneeded packages
WORKDIR /
RUN rm -rf /tmp/tippecanoe-src \
Expand Down
10 changes: 5 additions & 5 deletions docker/data_processing_script/process_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ files_to_check=(


# until scripts/deleteSuperfluousFiles.js is checked in
CONTAINER_COMMAND="node /scripts/updateBackgroundTiles.js && node ./scripts/generateDataVectorTiles.js && node ./scripts/generateGeometryIndex.js || echo 'Failed to update data.'"
CONTAINER_COMMAND="node ./scripts/updateBackgroundTiles.js && node ./scripts/generateDataVectorTiles.js && node ./scripts/generateGeometryIndex.js || echo 'Failed to update data.'"


OUTPUT_DIRECTORY=./app_data
OUTPUT_DIRECTORY=app_data
SOURCE=/pwadata/


# prepare filesystem folders
rm -r ${OUTPUT_DIRECTORY:="./app_data"}
rm -r ${OUTPUT_DIRECTORY}
rm -r build
mkdir -p ${OUTPUT_DIRECTORY}/geojson
mkdir ${OUTPUT_DIRECTORY}/search
mkdir ${OUTPUT_DIRECTORY}/data_tiles
mkdir ${OUTPUT_DIRECTORY}/background_tiles

cd docker/data_processing_container
cp -r ../../pwa_config ./
docker build -t mc_pwa_data_processing ./
rm -rf ./pwa_config
cd ../..
docker run --user $(id -u):$(id -g) -t --rm -v ${PWD}/${OUTPUT_DIRECTORY}/:/app_data:rw mc_pwa_data_processing bash -c "ls -al /app_data && $CONTAINER_COMMAND"

docker run --user $(id -u):$(id -g) -t --rm -v ${PWD}/${OUTPUT_DIRECTORY}/:/app_data/:rw mc_pwa_data_processing bash -c "ls -al /app_data && $CONTAINER_COMMAND"


rm -rf public/app_data
Expand Down
2 changes: 1 addition & 1 deletion pwa_config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"tramhalte_point": {
"displayName": "Tramhalte",
"path": "data/tramhalte_point.json",
"ID": "Naam",
"ID": "Naam_unique",
"propertiesTiles": ["Naam", "Label"],
"type": "circle",
"paint": {
Expand Down
Loading