Skip to content

Commit c6929ca

Browse files
committed
wip
1 parent 4e151aa commit c6929ca

108 files changed

Lines changed: 13192 additions & 189 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

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

compose.yaml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ services:
77
hydra:
88
image: oryd/hydra:v2.2.0
99
ports:
10-
- '4444:4444' # Public port
11-
- '4445:4445' # Admin port
10+
- "4444:4444" # Public port
11+
- "4445:4445" # Admin port
1212
command: serve -c /etc/config/hydra/hydra.yml all --dev
1313
volumes:
1414
- hydra-sqlite:/var/lib/sqlite:Z
1515
- ./docker/hydra-config:/etc/config/hydra:Z
1616
environment:
17-
DSN: 'sqlite:///var/lib/sqlite/db.sqlite?_fk=true'
18-
URLS_SELF_ISSUER: 'http://127.0.0.1:4444'
17+
DSN: "sqlite:///var/lib/sqlite/db.sqlite?_fk=true"
18+
URLS_SELF_ISSUER: "http://127.0.0.1:4444"
1919
restart: unless-stopped
2020
depends_on:
2121
- hydra-migrate
@@ -25,7 +25,7 @@ services:
2525
hydra-migrate:
2626
image: oryd/hydra:v2.2.0
2727
environment:
28-
DSN: 'sqlite:///var/lib/sqlite/db.sqlite?_fk=true'
28+
DSN: "sqlite:///var/lib/sqlite/db.sqlite?_fk=true"
2929
command: migrate -c /etc/config/hydra/hydra.yml sql -e --yes
3030
volumes:
3131
- hydra-sqlite:/var/lib/sqlite:Z
@@ -38,17 +38,17 @@ services:
3838
hydra-2:
3939
image: oryd/hydra:v2.2.0
4040
ports:
41-
- '4454:4454' # Public port
42-
- '4455:4455' # Admin port
41+
- "4454:4454" # Public port
42+
- "4455:4455" # Admin port
4343
command: serve -c /etc/config/hydra/hydra.yml all --dev
4444
volumes:
4545
- hydra-2-sqlite:/var/lib/sqlite:Z
4646
- ./docker/hydra-config:/etc/config/hydra:Z
4747
environment:
48-
DSN: 'sqlite:///var/lib/sqlite/db.sqlite?_fk=true'
49-
URLS_SELF_ISSUER: 'http://127.0.0.1:4454'
50-
SERVE_PUBLIC_PORT: '4454'
51-
SERVE_ADMIN_PORT: '4455'
48+
DSN: "sqlite:///var/lib/sqlite/db.sqlite?_fk=true"
49+
URLS_SELF_ISSUER: "http://127.0.0.1:4454"
50+
SERVE_PUBLIC_PORT: "4454"
51+
SERVE_ADMIN_PORT: "4455"
5252
restart: unless-stopped
5353
depends_on:
5454
- hydra-migrate
@@ -58,7 +58,7 @@ services:
5858
hydra-2-migrate:
5959
image: oryd/hydra:v2.2.0
6060
environment:
61-
DSN: 'sqlite:///var/lib/sqlite/db.sqlite?_fk=true'
61+
DSN: "sqlite:///var/lib/sqlite/db.sqlite?_fk=true"
6262
command: migrate -c /etc/config/hydra/hydra.yml sql -e --yes
6363
volumes:
6464
- hydra-2-sqlite:/var/lib/sqlite:Z
@@ -70,20 +70,32 @@ services:
7070
nats:
7171
image: nats
7272
ports:
73-
- '4222:4222'
74-
- '8222:8222'
73+
- "4222:4222"
74+
- "8222:8222"
7575
command: >
7676
--jetstream
7777
--http_port=8222
7878
--user=grafbase
7979
--pass=grafbase
80-
networks: ['nats']
80+
networks: ["nats"]
81+
82+
postgres:
83+
image: postgres:17
84+
environment:
85+
POSTGRES_USER: postgres
86+
POSTGRES_PASSWORD: grafbase
87+
ports:
88+
- "5432:5432"
89+
networks: ["postgres"]
90+
restart: unless-stopped
8191

8292
networks:
8393
hydra:
8494
hydra-2:
8595
nats:
96+
postgres:
8697

8798
volumes:
8899
hydra-sqlite:
89100
hydra-2-sqlite:
101+
postgres-data:

extensions/postgres/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
target
2+
build
3+
.build.lock

extensions/postgres/Cargo.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[package]
2+
name = "postgres"
3+
version = "0.1.0"
4+
edition = "2024"
5+
license = "Apache-2.0"
6+
7+
[lib]
8+
crate-type = ["cdylib"]
9+
10+
[dependencies]
11+
Inflector = "0.11.4"
12+
anyhow = "1.0.97"
13+
chrono.workspace = true
14+
grafbase-sdk = { path = "../../../grafbase/crates/grafbase-sdk" }
15+
indexmap = "2.8.0"
16+
itertools = "0.14.0"
17+
serde = { workspace = true, features = ["derive"] }
18+
serde_json.workspace = true
19+
20+
[dev-dependencies]
21+
grafbase-sdk = { path = "../../../grafbase/crates/grafbase-sdk", features = ["test-utils"] }
22+
indoc.workspace = true
23+
insta = { workspace = true, features = ["json"] }
24+
serde_json.workspace = true
25+
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "test-util"] }

0 commit comments

Comments
 (0)