Skip to content

Commit 8bd331c

Browse files
alnrory-bot
authored andcommitted
feat: move search sidecar to its own docker image
GitOrigin-RevId: 546f5823d047ac303add541e842791d63e14f9c3
1 parent ce58946 commit 8bd331c

File tree

9 files changed

+95
-14
lines changed

9 files changed

+95
-14
lines changed

quickstart-cockroach.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ services:
1313
hydra-migrate:
1414
environment:
1515
- DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4
16+
depends_on:
17+
"cockroachd":
18+
condition: service_healthy
1619
hydra:
1720
environment:
1821
- DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4
@@ -23,3 +26,12 @@ services:
2326
command: start-single-node --insecure
2427
networks:
2528
- intranet
29+
volumes:
30+
- cockroach-data:/cockroach/cockroach-data:rw
31+
healthcheck:
32+
test: ["CMD", "cockroach", "node", "status", "--insecure"]
33+
interval: 1s
34+
timeout: 30s
35+
retries: 30
36+
volumes:
37+
cockroach-data:

quickstart-mysql.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ services:
1313
hydra-migrate:
1414
environment:
1515
- DSN=mysql://root:secret@tcp(mysqld:3306)/mysql?max_conns=20&max_idle_conns=4
16+
depends_on:
17+
"mysqld":
18+
condition: service_healthy
1619
hydra:
1720
environment:
1821
- DSN=mysql://root:secret@tcp(mysqld:3306)/mysql?max_conns=20&max_idle_conns=4
@@ -24,3 +27,18 @@ services:
2427
- MYSQL_ROOT_PASSWORD=secret
2528
networks:
2629
- intranet
30+
healthcheck:
31+
test:
32+
[
33+
"CMD",
34+
"mysqladmin",
35+
"ping",
36+
"-h",
37+
"localhost",
38+
"--user=root",
39+
"--protocol=tcp",
40+
"--password=secret",
41+
]
42+
interval: 1s
43+
timeout: 30s
44+
retries: 30

quickstart-postgres.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,23 @@ services:
1313
hydra-migrate:
1414
environment:
1515
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
16+
depends_on:
17+
"postgresd":
18+
condition: service_healthy
1619
hydra:
1720
environment:
1821
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
1922
postgresd:
2023
image: postgres:16
2124
ports:
2225
- "5432:5432"
26+
healthcheck:
27+
test: ["CMD", "pg_isready", "-U", "hydra"]
28+
interval: 1s
29+
timeout: 30s
30+
retries: 30
2331
environment:
32+
- PGUSER=hydra
2433
- POSTGRES_USER=hydra
2534
- POSTGRES_PASSWORD=secret
2635
- POSTGRES_DB=hydra

quickstart.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ services:
1515
volumes:
1616
- hydra-sqlite:/mnt/sqlite
1717
command: "chmod -R 777 /mnt/sqlite"
18+
1819
hydra:
1920
# image: oryd/hydra:v25.4.0
2021
build:
@@ -35,8 +36,8 @@ services:
3536
- DSN=sqlite:///mnt/sqlite/db.sqlite?_fk=true&mode=rwc
3637
restart: unless-stopped
3738
depends_on:
38-
- hydra-migrate
39-
- sqlite
39+
hydra-migrate:
40+
condition: service_completed_successfully
4041
networks:
4142
- intranet
4243
hydra-migrate:
@@ -57,7 +58,8 @@ services:
5758
networks:
5859
- intranet
5960
depends_on:
60-
- sqlite
61+
sqlite:
62+
condition: service_completed_successfully
6163
consent:
6264
environment:
6365
- HYDRA_ADMIN_URL=http://hydra:4445

test/conformance/docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
version: "3.7"
2-
31
services:
42
hydra-migrate:
3+
image: hydra-migrate:head
54
build:
6-
# When running with `run.sh` the cwd is the project's root.
5+
# When running with `start.sh` the cwd is the project's root.
76
context: .
87
dockerfile: ./test/conformance/hydra/Dockerfile
98

109
hydra:
10+
image: hydra-serve:head
1111
build:
12-
# When running with `run.sh` the cwd is the project's root.
12+
# When running with `start.sh` the cwd is the project's root.
1313
context: .
1414
dockerfile: ./test/conformance/hydra/Dockerfile
1515
environment:
@@ -34,7 +34,7 @@ services:
3434
httpd:
3535
image: oryd/hydra-oidc-httpd:latest
3636
# build:
37-
# # When running with `run.sh` the cwd is the project's root.
37+
# # When running with `start.sh` the cwd is the project's root.
3838
# context: ./test/conformance
3939
# dockerfile: httpd/Dockerfile
4040
ports:
@@ -48,7 +48,7 @@ services:
4848
server:
4949
image: oryd/hydra-oidc-server:latest
5050
# build:
51-
# # When running with `run.sh` the cwd is the project's root.
51+
# # When running with `start.sh` the cwd is the project's root.
5252
# context: ./test/conformance
5353
# dockerfile: Dockerfile
5454
depends_on:

test/conformance/start.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ cd "$( dirname "${BASH_SOURCE[0]}" )/../.."
55

66
# shellcheck disable=SC2086
77
docker compose -f quickstart.yml -f quickstart-postgres.yml -f test/conformance/docker-compose.yml up ${1:-} -d --force-recreate --build
8-
docker ps -a
9-
docker images

test/e2e/docker-compose.cockroach.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ services:
77
- DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4
88
command: migrate sql up -e --yes
99
restart: on-failure
10+
depends_on:
11+
"cockroachd":
12+
condition: service_healthy
1013

1114
hydra:
1215
depends_on:
13-
- hydra-migrate
16+
hydra-migrate:
17+
condition: service_completed_successfully
1418
environment:
1519
- DSN=cockroach://root@cockroachd:26257/defaultdb?sslmode=disable&max_conns=20&max_idle_conns=4
1620

@@ -19,3 +23,12 @@ services:
1923
ports:
2024
- "26257:26257"
2125
command: start-single-node --insecure
26+
volumes:
27+
- cockroach-data:/cockroach/cockroach-data:rw
28+
healthcheck:
29+
test: ["CMD", "cockroach", "node", "status", "--insecure"]
30+
interval: 1s
31+
timeout: 30s
32+
retries: 30
33+
volumes:
34+
cockroach-data:

test/e2e/docker-compose.mysql.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ services:
77
- DSN=mysql://root:secret@tcp(mysqld:3306)/mysql?max_conns=20&max_idle_conns=4
88
command: migrate sql up -e --yes
99
restart: on-failure
10+
depends_on:
11+
"mysqld":
12+
condition: service_healthy
1013

1114
hydra:
1215
depends_on:
13-
- hydra-migrate
16+
hydra-migrate:
17+
condition: service_completed_successfully
1418
environment:
1519
- DSN=mysql://root:secret@tcp(mysqld:3306)/mysql?max_conns=20&max_idle_conns=4
1620

@@ -20,3 +24,18 @@ services:
2024
- "3306:3306"
2125
environment:
2226
- MYSQL_ROOT_PASSWORD=secret
27+
healthcheck:
28+
test:
29+
[
30+
"CMD",
31+
"mysqladmin",
32+
"ping",
33+
"-h",
34+
"localhost",
35+
"--user=root",
36+
"--protocol=tcp",
37+
"--password=secret",
38+
]
39+
interval: 1s
40+
timeout: 30s
41+
retries: 30

test/e2e/docker-compose.postgres.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,28 @@ services:
77
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
88
command: migrate sql up -e --yes
99
restart: on-failure
10+
depends_on:
11+
"postgresd":
12+
condition: service_healthy
1013

1114
hydra:
1215
depends_on:
13-
- hydra-migrate
16+
hydra-migrate:
17+
condition: service_completed_successfully
1418
environment:
1519
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
1620

1721
postgresd:
1822
image: postgres:11.8
1923
ports:
2024
- "5432:5432"
25+
healthcheck:
26+
test: ["CMD", "pg_isready", "-U", "hydra"]
27+
interval: 1s
28+
timeout: 30s
29+
retries: 30
2130
environment:
31+
- PGUSER=hydra
2232
- POSTGRES_USER=hydra
2333
- POSTGRES_PASSWORD=secret
2434
- POSTGRES_DB=hydra

0 commit comments

Comments
 (0)