Skip to content

Commit

Permalink
Add data extraction api
Browse files Browse the repository at this point in the history
  • Loading branch information
flenny authored Oct 15, 2024
2 parents bba0979 + 527fdc8 commit e35fd4e
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

- WMTS Services are now supported as custom user layers.
- Added data extraction API.

### Changed

Expand Down
15 changes: 14 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ services:
db:
condition: service_healthy
healthcheck:
test: "curl --fail http://127.0.0.1:5000/api/v2/version || exit 1"
test: "curl --fail http://127.0.0.1:5000/health || exit 1"
interval: 20s
timeout: 10s
retries: 30
Expand All @@ -115,6 +115,7 @@ services:
DOTNET_USE_POLLING_FILE_WATCHER: 1
CONNECTIONSTRINGS__BdmsContext: Host=localhost;Username=SPAWNPLOW;Password=YELLOWSPATULA;Database=bdms;CommandTimeout=300
ReverseProxy__Clusters__pythonApi__Destinations__legacyApi__Address: "http://localhost:8888/"
ReverseProxy__Clusters__dataExtractionApi__Destinations__dataExtractionApi__Address: "http://localhost:8000/"
Auth__Authority: http://localhost:4011
Auth__Audience: "bdms-client"
Auth__GroupClaimType: "local_groups_claim"
Expand All @@ -124,6 +125,18 @@ services:
S3__SECURE: 1
extra_hosts:
- "localhost:host-gateway"
dataextraction:
image: ghcr.io/swisstopo/swissgeol-boreholes-dataextraction-api:edge
restart: unless-stopped
ports:
- 8000:8000
environment:
AWS_ENDPOINT: http://minio:9000
AWS_ACCESS_KEY_ID: REDSQUIRREL
AWS_SECRET_ACCESS_KEY: YELLOWMONKEY
AWS_S3_BUCKET: cannonflea
healthcheck:
test: "curl --fail http://localhost:8000/health || exit 1"
oidc-server:
image: soluto/oidc-server-mock
restart: unless-stopped
Expand Down
2 changes: 1 addition & 1 deletion src/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ENV LC_ALL=C.UTF-8

COPY --from=build /app/publish .

HEALTHCHECK CMD curl --fail http://localhost:8080/health || exit 1
HEALTHCHECK CMD ["bash", "-c", "curl --fail http://localhost:8080/health || exit 1"]

# Switch to the non-root user 'app' defined in the base image
USER $APP_UID
Expand Down
7 changes: 7 additions & 0 deletions src/api/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
"Address": "http://localhost:8888/"
}
}
},
"dataExtractionApi": {
"Destinations": {
"dataExtractionApi": {
"Address": "http://localhost:8000/"
}
}
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/api/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@
"Match": {
"Path": "/api/v1/{**catch-all}"
}
},
"dataExtractionApi": {
"ClusterId": "dataExtractionApi",
"AuthorizationPolicy": "Viewer",
"Match": {
"Path": "/dataextraction/{**catch-all}"
},
"Transforms": [
{
"PathRemovePrefix": "/dataextraction"
}
]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/client/cypress/e2e/settings/mapSettings.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe("map settings", () => {
goToRouteAndAcceptTerms("/setting");

const wmsName = "Army logistics centres (ALC)";
const wmtsName = "Wetness potential agricultural land";
const wmtsName = "Map swissTLM for 3D (color)";

cy.contains("Map").click();
// Add WMS
Expand Down
4 changes: 4 additions & 0 deletions src/view-sync/docker-compose.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ services:
environment:
# use development environment to enable seeding the database
- ASPNETCORE_ENVIRONMENT=Development
minio:
extends:
file: ../../docker-compose.yml
service: minio

0 comments on commit e35fd4e

Please sign in to comment.