Setup: Reorganize config files for Raspberry Pi and DigitalOcean #4414

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-07-10 22:02:38 +02:00
parent 287b921d4f
commit e6a1b54547
18 changed files with 13 additions and 70 deletions

View File

@@ -18,7 +18,7 @@ GETTING STARTED
Run this script as root to install PhotoPrism on a cloud server e.g.
at DigitalOcean:
bash <(curl -s https://dl.photoprism.app/docker/cloud/setup.sh)
bash <(curl -s https://dl.photoprism.app/cloud/digitalocean/setup.sh)
This may take a while to complete, depending on the performance of
your server and its internet connection.

View File

@@ -4,7 +4,7 @@
#
# Run this script as root to install PhotoPrism on a cloud server e.g. at DigitalOcean:
#
# bash <(curl -s https://dl.photoprism.app/docker/cloud/setup.sh)
# bash <(curl -s https://dl.photoprism.app/cloud/digitalocean/setup.sh)
#
# This may take a while to complete, depending on the performance of your
# server and its internet connection.
@@ -38,12 +38,6 @@
# Configuring multiple apps on the same server is beyond the scope of this base
# config and for advanced users only.
#
# This config includes Ofelia, a docker job scheduler:
#
# https://github.com/mcuadros/ofelia
#
# See jobs.ini for details.
#
# SYSTEM REQUIREMENTS
# ------------------------------------------------------------------------
#
@@ -214,16 +208,6 @@ services:
MARIADB_PASSWORD: "_admin_password_"
MARIADB_ROOT_PASSWORD: "_admin_password_"
## Ofelia Job Runner (recommended)
## see https://github.com/mcuadros/ofelia
ofelia:
restart: always
image: mcuadros/ofelia:latest
container_name: ofelia
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./jobs.ini:/etc/ofelia/config.ini"
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.app/getting-started/updates/#watchtower
watchtower:

View File

@@ -63,9 +63,9 @@
"LC_CTYPE=en_US.UTF-8"
],
"scripts": [
"digitalocean/firewall.sh",
"digitalocean/cleanup.sh",
"digitalocean/check.sh"
"init/firewall.sh",
"init/cleanup.sh",
"init/check.sh"
]
}
]

View File

@@ -10,7 +10,7 @@
# so that it runs once when the server is booting for the first time:
#
# cd /var/lib/cloud/scripts/per-instance
# curl -fsSL https://dl.photoprism.app/docker/cloud/install_photoprism.sh > install_photoprism.sh
# curl -fsSL https://dl.photoprism.app/cloud/digitalocean/install_photoprism.sh > install_photoprism.sh
# chmod 700 install_photoprism.sh
#
# To create a reusable image for DigitalOcean:
@@ -21,4 +21,4 @@
#
# Enjoy!
bash <(curl -s https://dl.photoprism.app/docker/cloud/setup.sh)
bash <(curl -s https://dl.photoprism.app/cloud/digitalocean/setup.sh)

View File

@@ -68,10 +68,10 @@ mkdir -p /opt/photoprism/originals /opt/photoprism/import /opt/photoprism/storag
echo "Generating certificates..."
# download ssl config
curl -fsSL https://dl.photoprism.app/docker/cloud/certs/ca.conf > /opt/photoprism/certs/ca.conf
curl -fsSL https://dl.photoprism.app/docker/cloud/certs/cert.conf > /opt/photoprism/certs/cert.conf
curl -fsSL https://dl.photoprism.app/docker/cloud/certs/config.yml > /opt/photoprism/certs/config.yml
curl -fsSL https://dl.photoprism.app/docker/cloud/certs/openssl.conf > /opt/photoprism/certs/openssl.conf
curl -fsSL https://dl.photoprism.app/cloud/digitalocean/certs/ca.conf > /opt/photoprism/certs/ca.conf
curl -fsSL https://dl.photoprism.app/cloud/digitalocean/certs/cert.conf > /opt/photoprism/certs/cert.conf
curl -fsSL https://dl.photoprism.app/cloud/digitalocean/certs/config.yml > /opt/photoprism/certs/config.yml
curl -fsSL https://dl.photoprism.app/cloud/digitalocean/certs/openssl.conf > /opt/photoprism/certs/openssl.conf
# create ca
openssl genrsa -out /opt/photoprism/certs/ca.key 4096
@@ -101,12 +101,11 @@ PUBLIC_IP=$(curl -sfSL ifconfig.me)
echo "Downloading configuration..."
# download service config
COMPOSE_CONFIG=$(curl -fsSL https://dl.photoprism.app/docker/cloud/compose.yaml)
COMPOSE_CONFIG=$(curl -fsSL https://dl.photoprism.app/cloud/digitalocean/compose.yaml)
COMPOSE_CONFIG=${COMPOSE_CONFIG//_public_ip_/$PUBLIC_IP}
COMPOSE_CONFIG=${COMPOSE_CONFIG//$PASSWORD_PLACEHOLDER/$ADMIN_PASSWORD}
echo "${COMPOSE_CONFIG}" > /opt/photoprism/compose.yaml
curl -fsSL https://dl.photoprism.app/docker/cloud/jobs.ini > /opt/photoprism/jobs.ini
curl -fsSL https://dl.photoprism.app/docker/cloud/traefik.yaml > /opt/photoprism/traefik.yaml
curl -fsSL https://dl.photoprism.app/cloud/digitalocean/traefik.yaml > /opt/photoprism/traefik.yaml
# change permissions
chown -Rf photoprism:photoprism /opt/photoprism

View File

@@ -1,40 +0,0 @@
# See https://github.com/mcuadros/ofelia/blob/master/docs/jobs.md for job settings!
#
# Cron expressions in "schedule" represent times using 6 space-separated fields:
#
# Field name | Mandatory? | Allowed values | Allowed special characters
# ---------- | ---------- | -------------- | --------------------------
# Seconds | Yes | 0-59 | * / , -
# Minutes | Yes | 0-59 | * / , -
# Hours | Yes | 0-23 | * / , -
# Day of month | Yes | 1-31 | * / , - ?
# Month | Yes | 1-12 or JAN-DEC | * / , -
# Day of week | Yes | 0-6 or SUN-SAT | * / , - ?
# Uncomment to enable background indexing of files in your originals folder at 1am:
#
# [job-exec "photoprism index"]
# schedule = 0 0 1 * * *
# container = photoprism
# command = photoprism index --cleanup
# no-overlap = true
# Uncomment to automatically import every 2 hours:
#
# [job-exec "photoprism import"]
# schedule = @every 2h
# container = photoprism
# command = photoprism import
# no-overlap = true
[job-exec "photoprism convert"]
schedule = @daily
container = photoprism
command = photoprism convert
no-overlap = true
[job-exec "photoprism backup"]
schedule = @daily
container = photoprism
command = photoprism backup -a -i -f /photoprism/storage/index-backup.sql
no-overlap = true