-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from camptocamp/add_FE_container
geoshop FE
- Loading branch information
Showing
13 changed files
with
2,915 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
geoshop/resources/postgis_data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Build with node | ||
FROM node:22.6.0-slim AS builder | ||
WORKDIR /usr/src/app | ||
|
||
RUN apt update && \ | ||
apt upgrade -y && \ | ||
apt install -y git && \ | ||
git clone https://github.com/camptocamp/geoshop-front.git . && \ | ||
npm ci | ||
|
||
COPY config.json src/assets/configs/config.json | ||
|
||
RUN npm run build | ||
|
||
# Serve with nginx unpprevileged | ||
FROM nginxinc/nginx-unprivileged:stable | ||
|
||
# copy server config | ||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf | ||
|
||
# Copy build artifacts | ||
COPY --from=builder /usr/src/app/dist/ /usr/share/nginx/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"apiUrl": "http://localhost:8085/geoshop/", | ||
"mediaUrl": "", | ||
"baseMapUrl": "https://wmts.geo.admin.ch/1.0.0/{layer}/{style}/current/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}", | ||
"geocoderUrl": "https://nominatim.openstreetmap.org/search", | ||
"geocoderLayers": [ | ||
"adresses_sitn", "nom_local_lieu_dit", "search_cours_eau", | ||
"batiments_ofs", "axe_rue", "ImmeublesCanton", "communes", "cadastres", | ||
"recenter_to" | ||
], | ||
"contact": { | ||
"phone": { | ||
"label": "", | ||
"number": "" | ||
}, | ||
"email": "info@geogr.ch" | ||
}, | ||
"initialCenter": [ | ||
2765505.527577451, 1173931.8492200195 | ||
], | ||
"initialExtent": [ | ||
2420000, 1030000, 2900000, 1360000 | ||
], | ||
"resolutions": [250, 100, 50, 20, 10, 5, 2.5, 2, 1.5, 1, 0.5], | ||
"epsg": "EPSG:2056", | ||
"basemaps": [ | ||
{ | ||
"id": "ch.swisstopo.pixelkarte-farbe", | ||
"label": "Landeskarten (farbig)", | ||
"description": "Landeskarten (farbig)", | ||
"thumbUrl": "assets/images/planville.png", | ||
"matrixSet": "2056", | ||
"format": "jpeg" | ||
},{ | ||
"id": "ch.swisstopo.pixelkarte-grau", | ||
"label": "Karte Grau", | ||
"description": "Karte Grau", | ||
"thumbUrl": "assets/images/cadastre.png", | ||
"matrixSet": "2056", | ||
"format": "jpeg" | ||
} | ||
], | ||
"pageformats": [ | ||
{ | ||
"name": "A4", | ||
"width": 210, | ||
"height": 297 | ||
}, | ||
{ | ||
"name": "A3", | ||
"width": 297, | ||
"height": 420 | ||
}, | ||
{ | ||
"name": "A2", | ||
"width": 420, | ||
"height": 594 | ||
}, | ||
{ | ||
"name": "A1", | ||
"width": 594, | ||
"height": 841 | ||
}, | ||
{ | ||
"name": "A0", | ||
"width": 841, | ||
"height": 1189 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
server { | ||
listen 8080; | ||
server_name localhost; | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html =404; | ||
} | ||
|
||
location /welcome { | ||
rewrite ^/welcome/?$ / break; | ||
} | ||
|
||
location /geoshop/ { | ||
# Remove /api prefix and forward to geoportal | ||
rewrite ^/geoshop/(.*)$ /$1 break; | ||
proxy_pass http://geoshop:8000/; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} |
Oops, something went wrong.