| 1 | amends "../../config/Service.pkl" |
| 2 | |
| 3 | import "../keycloak/service.pkl" as keycloak |
| 4 | |
| 5 | meta { |
| 6 | name = "Shale" |
| 7 | } |
| 8 | requirements { |
| 9 | new keycloak.OpenIDClient { |
| 10 | clientId = module.id |
| 11 | name = module.meta.name |
| 12 | usernameAliases { ["snow"] = "clover" } |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | container { |
| 17 | image = "docker.io/astheno/shale@sha256:ece987e25ebe67275fbe105b1b03e650a9b3adfe716928beb717cde1d32c9652" |
| 18 | extraHosts { "\(keycloak.container.http.hostname):host-gateway" } |
| 19 | |
| 20 | http { |
| 21 | containerPort = 8000 |
| 22 | subdomain = "shale" |
| 23 | overrideFiles { |
| 24 | ["/-/theme.css"] = "theme.css" |
| 25 | ["/-/repo-icons/"] = "icons" |
| 26 | ["/-/studio-readme/"] = "readme" |
| 27 | } |
| 28 | headHtml { |
| 29 | ["/snowbound/"] = """ |
| 30 | <script defer src="/-/studio-readme/markdown-it.min.js"></script><script defer src="/-/studio-readme/purify.min.js"></script><script defer src="/-/studio-readme/readme.js"></script> |
| 31 | """ |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | volumes { |
| 36 | ["/data"] {} |
| 37 | ["/repositories_owned"] {} |
| 38 | ["/repositories_mirrors"] {} |
| 39 | ["/etc/crontabs"] {} |
| 40 | ["/etc/shale/theme.css"] { config = "theme.css" } |
| 41 | ["/etc/ssl/certs/ca-certificates.crt"] { |
| 42 | src = "/var/lib/studio/ca-bundle.crt" |
| 43 | readOnly = true |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | env { |
| 48 | ["DOMAIN"] = module.container.http.hostname |
| 49 | ["HOME"] = "/data" |
| 50 | ["SERVER_TITLE"] = "clover's git" |
| 51 | ["SESSION_SECRET"] = "${secret.own.session_secret}" |
| 52 | ["OAUTH2_CLIENT"] = "oidc,\(keycloak.container.http.hostname)/realms/master|${secret.oidc.clientId}|${secret.oidc.clientSecret}" |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | secrets { |
| 57 | ["session_secret"] {} |
| 58 | } |