11services :
22 keycloak :
33 hostname : keycloak
4- image : " ghcr.io/shift7-ch/keycloak:25.0.1 "
4+ image : " ${KATTA_KEYCLOAK_IMAGE} "
55 pull_policy : missing
66 ports :
77 - " ${KEYCLOAK_HTTP_PORT}:${KEYCLOAK_HTTP_PORT}"
@@ -28,7 +28,7 @@ services:
2828 retries : 15
2929
3030 keycloak-enable-direct-access-grant :
31- image : " ghcr.io/shift7-ch/keycloak:25.0.1 "
31+ image : " ${KATTA_KEYCLOAK_IMAGE} "
3232 pull_policy : missing
3333 entrypoint : [ "/bin/bash","-c" ]
3434 command :
@@ -98,10 +98,10 @@ services:
9898 set -e
9999 ls /setup
100100 /usr/bin/mc config host add myminio http://minio:${MINIO_PORT} minioadmin minioadmin
101-
101+
102102 /usr/bin/mc admin policy create myminio cipherduckcreatebucket /setup/minio_sts/createbucketpolicy.json
103103 /usr/bin/mc admin policy create myminio cipherduckaccessbucket /setup/minio_sts/accessbucketpolicy.json
104-
104+
105105 /usr/bin/mc idp openid add myminio cryptomator \
106106 config_url="http://keycloak:${KEYCLOAK_HTTP_PORT}/realms/cryptomator/.well-known/openid-configuration" \
107107 client_id="cryptomator" \
@@ -117,30 +117,30 @@ services:
117117 client_id="cryptomatorvaults" \
118118 client_secret="ignore-me" \
119119 role_policy="cipherduckaccessbucket"
120-
120+
121121 # see https://github.com/bitnami/charts/pull/28118
122122 /usr/bin/mc admin service restart myminio --wait --json
123123 # sleep necessary despite --wait...
124124 sleep 5
125-
125+
126126 /usr/bin/mc idp openid enable myminio cryptomator
127127 /usr/bin/mc idp openid enable myminio cryptomatorhub
128128 /usr/bin/mc idp openid enable myminio cryptomatorvaults
129-
129+
130130 /usr/bin/mc admin service restart myminio --wait --json
131131 sleep 5
132-
132+
133133 /usr/bin/mc idp openid ls myminio
134134 /usr/bin/mc idp openid info myminio
135-
135+
136136 # if container is restarted, the bucket already exists...
137137 /usr/bin/mc mb myminio/handmade || true
138138 /usr/bin/mc rm --recursive --force myminio/handmade
139-
139+
140140 echo "createbuckets successful"
141141
142142 hub :
143- image : " ghcr.io/shift7-ch/katta-server:latest "
143+ image : " ${KATTA_SERVER_IMAGE} "
144144 depends_on :
145145 keycloak :
146146 condition : service_healthy
@@ -188,7 +188,7 @@ services:
188188 chmod +x ./curl
189189 ./curl --version
190190 wget https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64 -O jq
191- chmod +x ./jq
191+ chmod +x ./jq
192192 ./jq --version
193193 ./curl -v -X POST http://keycloak:${KEYCLOAK_HTTP_PORT}/realms/cryptomator/protocol/openid-connect/token \
194194 -H "Content-Type: application/x-www-form-urlencoded" \
@@ -197,14 +197,14 @@ services:
197197 -d "username=admin" \
198198 -d "password=admin" | tee access_token.txt
199199 export ACCESS_TOKEN=`cat access_token.txt | ./jq ".access_token" | tr -d '"'`
200-
200+
201201 echo $$ACCESS_TOKEN
202202 cat /setup/minio_sts/minio_sts_profile.json | sed -e 's/9000/${MINIO_PORT}/g' > /tmp/minio_sts_profile.json
203203 cat /setup/minio_static/minio_static_profile.json | sed -e 's/9000/${MINIO_PORT}/g' > /tmp/minio_static_profile.json
204-
204+
205205 ./curl -v --fail -X PUT http://hub:${HUB_PORT}/api/storageprofile/s3sts -d @/tmp/minio_sts_profile.json -H "Content-Type: application/json" -H "Authorization: Bearer $$ACCESS_TOKEN"
206206 ./curl -v --fail -X PUT http://hub:${HUB_PORT}/api/storageprofile/s3 -d @/tmp/minio_static_profile.json -H "Content-Type: application/json" -H "Authorization: Bearer $$ACCESS_TOKEN"
207207 ./curl -v --fail -X PUT http://hub:${HUB_PORT}/api/storageprofile/s3sts -d @setup/aws_sts/aws_sts_profile.json -H "Content-Type: application/json" -H "Authorization: Bearer $$ACCESS_TOKEN"
208208 ./curl -v --fail -X PUT http://hub:${HUB_PORT}/api/storageprofile/s3 -d @setup/aws_static/aws_static_profile.json -H "Content-Type: application/json" -H "Authorization: Bearer $$ACCESS_TOKEN"
209209 ./curl -v --fail http://hub:${HUB_PORT}/api/storageprofile/ -H "Authorization: Bearer $$ACCESS_TOKEN"
210- echo "createbuckets successful"
210+ echo "createbuckets successful"
0 commit comments