Skip to content

Commit

Permalink
Adjust Simplification in tiler.
Browse files Browse the repository at this point in the history
Update config to use var envs files

Set  --acl public-read for rapid bucket files

Remove deployment rapid in branch deploy/rapid

Update helm deployment for staging and production
  • Loading branch information
Rub21 committed Mar 19, 2024
1 parent a6a78fa commit e21e729
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/chartpress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Chartpress Publish and Deploy
on: push
on:
push:
branches:
- 'main'
- 'staging'
jobs:
build:
runs-on: ubuntu-20.04
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/frontend-rapid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
branches:
- 'main'
- 'staging'
- 'deploy/rapid'
jobs:
rapid:
runs-on: ubuntu-latest
Expand All @@ -14,7 +13,7 @@ jobs:
with:
access_token: ${{ github.token }}
- name: Set environment variables - Staging
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/deploy/rapid'
if: github.ref == 'refs/heads/staging'
uses: allenevans/[email protected]
with:
RAPID_BUCKET: rapid-staging.openhistoricalmap.org
Expand Down Expand Up @@ -84,7 +83,7 @@ jobs:
- name: Push data to s3 and clean cloudfront cache
if: ${{ success() }}
run: |
aws s3 sync dist/ s3://${RAPID_BUCKET}/
aws s3 sync dist/ s3://${RAPID_BUCKET}/ --acl public-read
aws cloudfront create-invalidation --distribution-id=${CLOUDFRONT_DISTRIBUTION_ID} --paths=/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ images/.env
images/tiler.yml
values.dev.yaml
secrets
tegola
tegola
envs/.env.tiler
envs/.env.web
2 changes: 1 addition & 1 deletion compose/tiler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ services:
ports:
- "9090:9090"
env_file:
- ../envs/.env.tiler.example
- ../envs/.env.tiler
restart: always
4 changes: 2 additions & 2 deletions compose/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
volumes:
- ./data/db-data:/var/lib/postgresql/data
env_file:
- ./.env.web.example
- ./.env.web
web:
image: osmseed-web:v1
build:
Expand All @@ -20,7 +20,7 @@ services:
ports:
- '80:80'
env_file:
- ./.env.web.example
- ./.env.web
####### Enable for development mode
# volumes:
# - ./../../ohm-website:/var/www
10 changes: 5 additions & 5 deletions images/tiler-server/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,35 @@ max_connections = 40
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 750),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 500),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"

[[providers.layers]]
name = "land_3-5"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 300),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 200),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"

[[providers.layers]]
name = "land_6-7"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 150),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 70),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"

[[providers.layers]]
name = "land_8-9"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 75),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 30),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"

[[providers.layers]]
name = "land_10-12"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 30),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 10),!BBOX!) AS geometry, ogc_fid FROM land_polygons WHERE wkb_geometry && !BBOX!"

[[providers.layers]]
name = "land_13-15"
Expand Down

0 comments on commit e21e729

Please sign in to comment.