chore(containers): make photoprism useful

This commit is contained in:
Michele Cereda
2024-06-02 03:08:52 +02:00
parent a8d01c5ee4
commit 8eef3a5474
2 changed files with 21 additions and 8 deletions

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env make
pre-flight:
@mkdir -pv 'import' 'originals' 'storage'
firewalld-open: override service_name ?= photoprism
firewalld-open: override port ?= 2342
firewalld-open: ${shell which 'firewall-cmd'}
@sudo firewall-cmd --permanent --new-service '${service_name}'
@sudo firewall-cmd --permanent --service '${service_name}' --set-description 'FIXME'
@sudo firewall-cmd --permanent --service '${service_name}' --set-short 'FIXME'
@sudo firewall-cmd --permanent --service '${service_name}' --add-port '${port}/tcp'
@sudo firewall-cmd --permanent --add-service '${service_name}'
@sudo firewall-cmd --reload
composition-go-brrr: ${shell which 'docker-compose'}
@docker-compose up -d

View File

@@ -3,10 +3,7 @@ services:
photoprism:
container_name: photoprism
image: photoprism/photoprism:latest
## Don't enable automatic restarts until PhotoPrism has been properly configured and tested!
## If the service gets stuck in a restart loop, this points to a memory, filesystem, network, or database issue:
## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors
# restart: unless-stopped
# restart: unless-stopped # configure first, then enable
stop_grace_period: 10s
security_opt:
- seccomp:unconfined
@@ -14,8 +11,8 @@ services:
ports:
- "2342:2342"
environment:
PHOTOPRISM_ADMIN_USER: "admin"
PHOTOPRISM_ADMIN_PASSWORD: "insecure"
PHOTOPRISM_ADMIN_USER: "admin" # FIXME?
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # FIXME
PHOTOPRISM_AUTH_MODE: "password"
PHOTOPRISM_SITE_URL: "http://localhost:2342/"
PHOTOPRISM_DISABLE_TLS: "false"
@@ -47,6 +44,7 @@ services:
PHOTOPRISM_SITE_CAPTION: "AI-Powered Photos App"
PHOTOPRISM_SITE_DESCRIPTION: ""
PHOTOPRISM_SITE_AUTHOR: ""
PHOTOPRISM_INIT: "tensorflow gpu https" # FIXME?
PHOTOPRISM_UID: 1000
PHOTOPRISM_GID: 100
PHOTOPRISM_UMASK: 0022
@@ -56,5 +54,3 @@ services:
- "./originals:/photoprism/originals"
- "./import:/photoprism/import"
- "./storage:/photoprism/storage"
volumes:
originals: