File tree Expand file tree Collapse file tree 4 files changed +16
-14
lines changed
Expand file tree Collapse file tree 4 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ FROM alpine:3.20
33RUN <<HEREDOC
44 apk add --no-cache --upgrade ca-certificates
55
6- # Add a user/group for Ory with a stable UID + GID:
7- # NOTE: This only appears relevant for supporting hydra as non-root, otherwise unnecessary .
6+ # Add a user/group for Ory with a stable UID + GID. Values are from nonroot from distroless
7+ # for interoperability with other containers .
88 addgroup --system --gid 65532 ory
99 adduser --system --uid 65532 \
1010 --gecos "Ory User" \
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ ENV CGO_ENABLED 1
1313RUN go mod download
1414COPY . .
1515
16- RUN go build -tags sqlite,json1, hsm -o /usr/bin/hydra
16+ RUN go build -tags sqlite,hsm -o /usr/bin/hydra
1717
1818ENV HSM_ENABLED=true
1919ENV HSM_LIBRARY=/usr/lib/softhsm/libsofthsm2.so
Original file line number Diff line number Diff line change 1010# #
1111# ##########################################################################
1212services :
13+ sqlite :
14+ image : busybox
15+ volumes :
16+ - hydra-sqlite:/mnt/sqlite
17+ command : " chmod -R 777 /mnt/sqlite"
1318 hydra :
1419 image : oryd/hydra:v2.2.0
1520 build :
@@ -21,19 +26,17 @@ services:
2126 - " 5555:5555" # Port for hydra token user
2227 command : serve -c /etc/config/hydra/hydra.yml all --dev
2328 volumes :
24- - type : volume
25- source : hydra-sqlite
26- target : /mount/sqlite
27- read_only : false
29+ - hydra-sqlite:/mnt/sqlite:rw
2830 - type : bind
2931 source : ./contrib/quickstart/5-min
3032 target : /etc/config/hydra
3133 pull_policy : missing
3234 environment :
33- - DSN=sqlite:///mount /sqlite/db.sqlite?_fk=true
35+ - DSN=sqlite:///mnt /sqlite/db.sqlite?_fk=true&mode=rwc
3436 restart : unless-stopped
3537 depends_on :
3638 - hydra-migrate
39+ - sqlite
3740 networks :
3841 - intranet
3942 hydra-migrate :
@@ -42,20 +45,19 @@ services:
4245 context : .
4346 dockerfile : .docker/Dockerfile-local-build
4447 environment :
45- - DSN=sqlite:///mount /sqlite/db.sqlite?_fk=true
48+ - DSN=sqlite:///mnt /sqlite/db.sqlite?_fk=true&mode=rwc
4649 command : migrate -c /etc/config/hydra/hydra.yml sql up -e --yes
4750 pull_policy : missing
4851 volumes :
49- - type : volume
50- source : hydra-sqlite
51- target : /mount/sqlite
52- read_only : false
52+ - hydra-sqlite:/mnt/sqlite:rw
5353 - type : bind
5454 source : ./contrib/quickstart/5-min
5555 target : /etc/config/hydra
5656 restart : on-failure
5757 networks :
5858 - intranet
59+ depends_on :
60+ - sqlite
5961 consent :
6062 environment :
6163 - HYDRA_ADMIN_URL=http://hydra:4445
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ COPY . .
2020
2121RUN go build -tags sqlite -o /usr/bin/hydra
2222
23- VOLUME /var/lib /sqlite
23+ VOLUME /mnt /sqlite
2424
2525# Exposing the ory home directory
2626VOLUME /home/ory
You can’t perform that action at this time.
0 commit comments