mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Setup: Reorganize config files for Raspberry Pi and DigitalOcean #4414
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -18,7 +18,7 @@ GETTING STARTED
|
|||||||
Run this script as root to install PhotoPrism on a cloud server e.g.
|
Run this script as root to install PhotoPrism on a cloud server e.g.
|
||||||
at DigitalOcean:
|
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
|
This may take a while to complete, depending on the performance of
|
||||||
your server and its internet connection.
|
your server and its internet connection.
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Run this script as root to install PhotoPrism on a cloud server e.g. at DigitalOcean:
|
# 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
|
# This may take a while to complete, depending on the performance of your
|
||||||
# server and its internet connection.
|
# server and its internet connection.
|
||||||
@@ -38,12 +38,6 @@
|
|||||||
# Configuring multiple apps on the same server is beyond the scope of this base
|
# Configuring multiple apps on the same server is beyond the scope of this base
|
||||||
# config and for advanced users only.
|
# 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
|
# SYSTEM REQUIREMENTS
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@@ -214,16 +208,6 @@ services:
|
|||||||
MARIADB_PASSWORD: "_admin_password_"
|
MARIADB_PASSWORD: "_admin_password_"
|
||||||
MARIADB_ROOT_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)
|
## Watchtower upgrades services automatically (optional)
|
||||||
## see https://docs.photoprism.app/getting-started/updates/#watchtower
|
## see https://docs.photoprism.app/getting-started/updates/#watchtower
|
||||||
watchtower:
|
watchtower:
|
||||||
@@ -63,9 +63,9 @@
|
|||||||
"LC_CTYPE=en_US.UTF-8"
|
"LC_CTYPE=en_US.UTF-8"
|
||||||
],
|
],
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"digitalocean/firewall.sh",
|
"init/firewall.sh",
|
||||||
"digitalocean/cleanup.sh",
|
"init/cleanup.sh",
|
||||||
"digitalocean/check.sh"
|
"init/check.sh"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
# so that it runs once when the server is booting for the first time:
|
# so that it runs once when the server is booting for the first time:
|
||||||
#
|
#
|
||||||
# cd /var/lib/cloud/scripts/per-instance
|
# 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
|
# chmod 700 install_photoprism.sh
|
||||||
#
|
#
|
||||||
# To create a reusable image for DigitalOcean:
|
# To create a reusable image for DigitalOcean:
|
||||||
@@ -21,4 +21,4 @@
|
|||||||
#
|
#
|
||||||
# Enjoy!
|
# Enjoy!
|
||||||
|
|
||||||
bash <(curl -s https://dl.photoprism.app/docker/cloud/setup.sh)
|
bash <(curl -s https://dl.photoprism.app/cloud/digitalocean/setup.sh)
|
||||||
@@ -68,10 +68,10 @@ mkdir -p /opt/photoprism/originals /opt/photoprism/import /opt/photoprism/storag
|
|||||||
echo "Generating certificates..."
|
echo "Generating certificates..."
|
||||||
|
|
||||||
# download ssl config
|
# 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/cloud/digitalocean/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/cloud/digitalocean/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/cloud/digitalocean/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/openssl.conf > /opt/photoprism/certs/openssl.conf
|
||||||
|
|
||||||
# create ca
|
# create ca
|
||||||
openssl genrsa -out /opt/photoprism/certs/ca.key 4096
|
openssl genrsa -out /opt/photoprism/certs/ca.key 4096
|
||||||
@@ -101,12 +101,11 @@ PUBLIC_IP=$(curl -sfSL ifconfig.me)
|
|||||||
echo "Downloading configuration..."
|
echo "Downloading configuration..."
|
||||||
|
|
||||||
# download service config
|
# 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//_public_ip_/$PUBLIC_IP}
|
||||||
COMPOSE_CONFIG=${COMPOSE_CONFIG//$PASSWORD_PLACEHOLDER/$ADMIN_PASSWORD}
|
COMPOSE_CONFIG=${COMPOSE_CONFIG//$PASSWORD_PLACEHOLDER/$ADMIN_PASSWORD}
|
||||||
echo "${COMPOSE_CONFIG}" > /opt/photoprism/compose.yaml
|
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/cloud/digitalocean/traefik.yaml > /opt/photoprism/traefik.yaml
|
||||||
curl -fsSL https://dl.photoprism.app/docker/cloud/traefik.yaml > /opt/photoprism/traefik.yaml
|
|
||||||
|
|
||||||
# change permissions
|
# change permissions
|
||||||
chown -Rf photoprism:photoprism /opt/photoprism
|
chown -Rf photoprism:photoprism /opt/photoprism
|
||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user