Skip to content

Commit 4724170

Browse files
committed
wip
1 parent e1695a6 commit 4724170

File tree

4 files changed

+42
-13
lines changed

4 files changed

+42
-13
lines changed

.github/workflows/cite.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,39 @@ jobs:
1212
name: OGC Cite Validation (Features)
1313
runs-on: ubuntu-latest
1414

15+
services:
16+
db:
17+
image: docker.io/postgis/postgis
18+
# Provide the password for postgres
19+
env:
20+
POSTGRES_USER: postgres
21+
POSTGRES_PASSWORD: password
22+
POSTGRES_DB: ogcapi
23+
# Set health checks to wait until postgres has started
24+
options: >-
25+
--health-cmd pg_isready
26+
--health-interval 10s
27+
--health-timeout 5s
28+
--health-retries 5
29+
1530
steps:
1631
- name: Checkout
1732
uses: actions/checkout@v4
1833

19-
- name: Setup
20-
run: docker compose up --build -d
34+
- name: Load
35+
run: cargo run -p data-loader -- --input data/ne_110m_admin_0_countries.geojson --collection countries
2136

22-
- name: Check running containers
23-
run: docker ps -a
37+
- name: Run
38+
run: cargo run -p cite-service &
2439

25-
- name: Build
26-
run: docker exec ogcapi cargo run -p data-loader -- --input data/ne_110m_admin_0_countries.geojson --collection countries
40+
- name: Check containers
41+
run: docker ps -a
2742

28-
- name: Run
29-
run: docker exec -d ogcapi cargo run -p cite-service
43+
- name: Check networks
44+
run: docker network ls
45+
46+
- name: Check running service
47+
run: curl http://host.docker.internal:8484
3048

3149
- name: Validate
3250
uses: OSGEO/[email protected]

Cargo.lock

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ services:
4747
command: tail -f /dev/null
4848
ports:
4949
- ${APP_PORT}:${APP_PORT}
50+
extra_hosts:
51+
- "host.docker.internal:host-gateway"
5052

5153
minio:
5254
image: docker.io/minio/minio

examples/cite-service/src/main.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use clap::Parser;
22
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
33

44
use ogcapi::{
5-
processes::{gdal_loader::GdalLoader, geojson_loader::GeoJsonLoader, greeter::Greeter},
5+
processes::{geojson_loader::GeoJsonLoader, greeter::Greeter},
66
services::{AppState, Config, Service},
77
};
88

@@ -24,10 +24,7 @@ async fn main() {
2424
let state = AppState::new_from(&config).await;
2525

2626
// Register processes/processors
27-
let state = state.processors(vec![
28-
Box::new(Greeter),
29-
Box::new(GeoJsonLoader),
30-
]);
27+
let state = state.processors(vec![Box::new(Greeter), Box::new(GeoJsonLoader)]);
3128

3229
// Build & run with hyper
3330
Service::new_with(&config, state).await.serve().await;

0 commit comments

Comments
 (0)