Skip to content

Commit

Permalink
photoprism: make url more clear that needs scheme (#1152)
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k authored Dec 11, 2024
1 parent 320ed00 commit 70acea0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ix-dev/stable/photoprism/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ sources:
- https://photoprism.app/
title: Photoprism
train: stable
version: 1.2.1
version: 1.2.2
9 changes: 7 additions & 2 deletions ix-dev/stable/photoprism/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ questions:
attrs:
- variable: site_url
label: Site URL
description: The URL for the Photoprism site.
description: |
The URL for the Photoprism site.</br>
Examples:
- https://photoprism.example.com/photoprism
- https://photoprism.example.com
- http://photoprism.example.com
schema:
type: string
type: uri
- variable: public
label: Public
description: |
Expand Down
4 changes: 4 additions & 0 deletions ix-dev/stable/photoprism/templates/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
{% do c1.environment.add_env("PHOTOPRISM_ORIGINALS_PATH", values.consts.originals_path) %}

{% if values.photoprism.site_url %}
{% if "http://" not in values.photoprism.site_url and "https://" not in values.photoprism.site_url %}
{% do tpl.funcs.fail("Site URL must include a scheme (http:// or https://)") %}
{% endif %}

{% do c1.environment.add_env("PHOTOPRISM_SITE_URL", values.photoprism.site_url) %}
{% set no_scheme = values.photoprism.site_url.split("://")[1] %}
{% set path = no_scheme.split("/")[1:] %}
Expand Down

0 comments on commit 70acea0

Please sign in to comment.