mirror of
https://github.com/photoprism/photoprism.git
synced 2026-07-17 16:49:04 +00:00
Develop: Gate postgres on a compose profile, normalize comments #5590
The default development stack runs on MariaDB (PHOTOPRISM_DATABASE_DRIVER is "mysql", and the photoprism service depends_on only "mariadb"), so the postgres container should not start on a plain "docker compose up". Add profiles: [ "all", "postgres" ] so users opt in via --profile postgres, align every gated service to the same image / comment / profiles / stop_grace_period shape, add the missing per-block "docker compose --profile X up -d" examples, fix pre-existing "::" typos, and correct "qsql" to "psql" in the photoprism service environment comments across compose.yaml, compose.intel.yaml, and compose.nvidia.yaml.
This commit is contained in:
parent
12dbe82d36
commit
69e27ba461
3 changed files with 22 additions and 12 deletions
|
|
@ -95,7 +95,7 @@ services:
|
|||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_HTTP_COMPRESSION: "zstd,gzip" # improves transfer speed and bandwidth utilization (none, gzip, zstd, or comma-separated list e.g. "zstd,gzip")
|
||||
MYSQL_TCP_PORT: "${MARIADB_PORT:-4001}" # default MariaDB database port used by the "mariadb" client (see .my.cnf)
|
||||
PGPORT: "${POSTGRES_PORT:-4002}" # default PostgreSQL database port used by "qsql"
|
||||
PGPORT: "${POSTGRES_PORT:-4002}" # default PostgreSQL database port used by "psql"
|
||||
PHOTOPRISM_DATABASE_DRIVER: "mysql"
|
||||
PHOTOPRISM_DATABASE_SERVER: "mariadb:${MARIADB_PORT:-4001}"
|
||||
PHOTOPRISM_DATABASE_NAME: "photoprism"
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ services:
|
|||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_HTTP_COMPRESSION: "zstd,gzip" # improves transfer speed and bandwidth utilization (none, gzip, zstd, or comma-separated list e.g. "zstd,gzip")
|
||||
MYSQL_TCP_PORT: "${MARIADB_PORT:-4001}" # default MariaDB database port used by the "mariadb" client (see .my.cnf)
|
||||
PGPORT: "${POSTGRES_PORT:-4002}" # default PostgreSQL database port used by "qsql"
|
||||
PGPORT: "${POSTGRES_PORT:-4002}" # default PostgreSQL database port used by "psql"
|
||||
PHOTOPRISM_DATABASE_DRIVER: "mysql"
|
||||
PHOTOPRISM_DATABASE_SERVER: "mariadb:${MARIADB_PORT:-4001}"
|
||||
PHOTOPRISM_DATABASE_NAME: "photoprism"
|
||||
|
|
|
|||
30
compose.yaml
30
compose.yaml
|
|
@ -102,7 +102,7 @@ services:
|
|||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_HTTP_COMPRESSION: "zstd,gzip" # improves transfer speed and bandwidth utilization (none, gzip, zstd, or comma-separated list e.g. "zstd,gzip")
|
||||
MYSQL_TCP_PORT: "${MARIADB_PORT:-4001}" # default MariaDB database port used by the "mariadb" client (see .my.cnf)
|
||||
PGPORT: "${POSTGRES_PORT:-4002}" # default PostgreSQL database port used by "qsql"
|
||||
PGPORT: "${POSTGRES_PORT:-4002}" # default PostgreSQL database port used by "psql"
|
||||
PHOTOPRISM_DATABASE_DRIVER: "mysql"
|
||||
PHOTOPRISM_DATABASE_SERVER: "mariadb:${MARIADB_PORT:-4001}"
|
||||
PHOTOPRISM_DATABASE_NAME: "photoprism"
|
||||
|
|
@ -219,6 +219,10 @@ services:
|
|||
## Release Notes: https://www.postgresql.org/docs/release/
|
||||
postgres:
|
||||
image: postgres:18-alpine
|
||||
## Only starts this service if the "all" or "postgres" profile is specified:
|
||||
## docker compose --profile postgres up -d
|
||||
profiles: [ "all", "postgres" ]
|
||||
stop_grace_period: 10s
|
||||
expose:
|
||||
- "${POSTGRES_PORT:-4002}"
|
||||
## Publish the PostgreSQL port on the host for direct access from the host:
|
||||
|
|
@ -240,6 +244,8 @@ services:
|
|||
## Web UI: https://qdrant.localssl.dev/dashboard
|
||||
qdrant:
|
||||
image: qdrant/qdrant:latest
|
||||
## Only starts this service if the "all" or "qdrant" profile is specified:
|
||||
## docker compose --profile qdrant up -d
|
||||
profiles: [ "all", "qdrant" ]
|
||||
stop_grace_period: 10s
|
||||
links:
|
||||
|
|
@ -271,10 +277,10 @@ services:
|
|||
## docker compose exec ollama ollama pull gemma3:latest
|
||||
ollama:
|
||||
image: ollama/ollama:latest
|
||||
stop_grace_period: 10s
|
||||
## Only starts this service if the "all", "ollama", or "vision" profile is specified::
|
||||
## Only starts this service if the "all", "ollama", or "vision" profile is specified:
|
||||
## docker compose --profile ollama up -d
|
||||
profiles: [ "all", "ollama", "vision" ]
|
||||
stop_grace_period: 10s
|
||||
## Optionally publish the Ollama API on the host (no built-in auth — private/internal networks only):
|
||||
# ports:
|
||||
# - "${SERVICES_BIND_HOST:-127.0.0.1}:11434:11434" # Ollama API
|
||||
|
|
@ -322,10 +328,10 @@ services:
|
|||
## see https://github.com/open-webui/open-webui
|
||||
open-webui:
|
||||
image: ghcr.io/open-webui/open-webui:main
|
||||
stop_grace_period: 10s
|
||||
## Only starts this service if the "all", "ollama", "open-webui", or "vision" profile is specified::
|
||||
## docker compose --profile ollama up -d
|
||||
## Only starts this service if the "all", "ollama", "open-webui", or "vision" profile is specified:
|
||||
## docker compose --profile open-webui up -d
|
||||
profiles: [ "all", "ollama", "open-webui", "vision" ]
|
||||
stop_grace_period: 10s
|
||||
## Publish Open WebUI on the host (default access is via https://chat.localssl.dev/ through Traefik):
|
||||
ports:
|
||||
- "${SERVICES_BIND_HOST:-127.0.0.1}:8080:8080" # Open WebUI
|
||||
|
|
@ -350,10 +356,10 @@ services:
|
|||
## see https://github.com/photoprism/photoprism-vision
|
||||
photoprism-vision:
|
||||
image: photoprism/vision:latest
|
||||
stop_grace_period: 15s
|
||||
## Only starts this service if the "all" or "vision" profile is specified::
|
||||
## Only starts this service if the "all" or "vision" profile is specified:
|
||||
## docker compose --profile vision up -d
|
||||
profiles: [ "all", "vision" ]
|
||||
stop_grace_period: 15s
|
||||
working_dir: "/app"
|
||||
links:
|
||||
- "traefik:localssl.dev"
|
||||
|
|
@ -437,8 +443,10 @@ services:
|
|||
## Login with "user / photoprism" and "admin / photoprism".
|
||||
keycloak:
|
||||
image: quay.io/keycloak/keycloak:25.0
|
||||
stop_grace_period: 10s
|
||||
## Only starts this service if the "all", "auth", or "keycloak" profile is specified:
|
||||
## docker compose --profile keycloak up -d
|
||||
profiles: [ "all", "auth", "keycloak" ]
|
||||
stop_grace_period: 10s
|
||||
command: "start-dev" # development mode, do not use this in production!
|
||||
links:
|
||||
- "traefik:localssl.dev"
|
||||
|
|
@ -471,8 +479,10 @@ services:
|
|||
## ./photoprism client add --id=cs5cpu17n6gj2qo5 --secret=xcCbOrw6I0vcoXzhnOmXhjpVSyFq0l0e -s metrics -n Prometheus -e 60 -t 1
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
stop_grace_period: 10s
|
||||
## Only starts this service if the "all", "auth", or "prometheus" profile is specified:
|
||||
## docker compose --profile prometheus up -d
|
||||
profiles: [ "all", "auth", "prometheus" ]
|
||||
stop_grace_period: 10s
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=${COMPOSE_NETWORK_NAME:-photoprism}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue