creating multiple instances of photoprism one created by OMV plugin another using docker-compose, not able to connect to DB #4533
kiranreddy19
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As a POC first i tried on windows docker desktop, i successfully created two instances of photoprism and was able to access photoprism in browser, both versions. perfectly working using same mariadb instance with two different databases.
Coming back to OMV, i installed photoprism using OMV plugins option. Now i am trying to create a second instance of photoprism using compose file using podman-compose command. the issue is its says "config: waiting for the database to become available". Since first instance was created by OMV via its plugins feature I dont have have any visibility of its compose file(or it might have installed in a different way imo) and it is using podman. I am new to podman and i know docker, it seems most of the podman stuff seems similar to docker. So i coninued to work on podman.
The issue is second instance is not able to connect to mariadb container. i tried so many ways to set network in the second instance compose file which is not working. i dont know if it podman-compose issue or the way i am declaring network tags in compose file. its not able to connect to mariadb container. following are the files i have
This is error i face when i run "podman-compose -f docker-composeu2_nas.yml up"
Following is my compose file for only second instance.
`
networks:
podmanhere:
name: podman
external: true
services:
photoprism2:
## Use photoprism/photoprism:preview for testing preview builds:
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
stop_grace_period: 10s
depends_on:
- photoprism-db
security_opt:
- seccomp:unconfined
- apparmor:unconfined
## Server port mapping in the format "Host:Container". To use a different port, change the host port on
## the left-hand side and keep the container port, e.g. "80:2342" (for HTTP) or "443:2342 (for HTTPS):
ports:
- "2343:2342"
## Before you start the service, please check the following config options (and change them as needed):
## https://docs.photoprism.app/getting-started/config-options/
environment:
PHOTOPRISM_ADMIN_USER: "admin2" # admin login username
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # initial admin password (8-72 characters)
PHOTOPRISM_AUTH_MODE: "password" # authentication mode (public, password)
PHOTOPRISM_HTTP_HOST: "0.0.0.0"
PHOTOPRISM_HTTP_PORT: "2343"
PHOTOPRISM_SITE_URL: "http://localhost:2343/" # server URL in the format "http(s)://domain.name(:port)/(path)"
PHOTOPRISM_DISABLE_TLS: "false" # disables HTTPS/TLS even if the site URL starts with https:// and a certificate is available
PHOTOPRISM_DEFAULT_TLS: "true" # defaults to a self-signed HTTPS/TLS certificate if no other certificate is available
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # file size limit for originals in MB (increase for high-res video)
PHOTOPRISM_HTTP_COMPRESSION: "gzip" # improves transfer speed and bandwidth utilization (none or gzip)
PHOTOPRISM_DEBUG: "false" # run in debug mode, shows additional log messages
PHOTOPRISM_READONLY: "false" # do not modify originals folder; disables import, upload, and delete
PHOTOPRISM_EXPERIMENTAL: "false" # enables experimental features
PHOTOPRISM_DISABLE_CHOWN: "false" # disables updating storage permissions via chmod and chown on startup
PHOTOPRISM_DISABLE_WEBDAV: "false" # disables built-in WebDAV server
PHOTOPRISM_DISABLE_SETTINGS: "false" # disables settings UI and API
PHOTOPRISM_DISABLE_TENSORFLOW: "false" # disables all features depending on TensorFlow
PHOTOPRISM_DISABLE_FACES: "false" # disables face detection and recognition (requires TensorFlow)
PHOTOPRISM_DISABLE_CLASSIFICATION: "false" # disables image classification (requires TensorFlow)
PHOTOPRISM_DISABLE_VECTORS: "false" # disables vector graphics support
PHOTOPRISM_DISABLE_RAW: "false" # disables indexing and conversion of RAW images
PHOTOPRISM_RAW_PRESETS: "false" # enables applying user presets when converting RAW images (reduces performance)
PHOTOPRISM_SIDECAR_YAML: "true" # creates YAML sidecar files to back up picture metadata
PHOTOPRISM_BACKUP_ALBUMS: "true" # creates YAML files to back up album metadata
PHOTOPRISM_BACKUP_DATABASE: "true" # creates regular backups based on the configured schedule
PHOTOPRISM_BACKUP_SCHEDULE: "daily" # backup SCHEDULE in cron format (e.g. "0 12 * * *" for daily at noon) or at a random time (daily, weekly)
PHOTOPRISM_INDEX_SCHEDULE: "" # indexing SCHEDULE in cron format (e.g. "@every 3h" for every 3 hours; "" to disable)
PHOTOPRISM_AUTO_INDEX: 300 # delay before automatically indexing files in SECONDS when uploading via WebDAV (-1 to disable)
PHOTOPRISM_AUTO_IMPORT: -1 # delay before automatically importing files in SECONDS when uploading via WebDAV (-1 to disable)
PHOTOPRISM_DETECT_NSFW: "false" # automatically flags photos as private that MAY be offensive (requires TensorFlow)
PHOTOPRISM_UPLOAD_NSFW: "true" # allows uploads that MAY be offensive (no effect without TensorFlow)
PHOTOPRISM_DATABASE_DRIVER: "mysql" # MariaDB 10.5.12+ (MySQL successor) offers significantly better performance compared to SQLite
PHOTOPRISM_DATABASE_SERVER: "photoprism-db:3306" # MariaDB database server hostname (:port is optional)
PHOTOPRISM_DATABASE_NAME: "photoprism2" # MariaDB database schema name
PHOTOPRISM_DATABASE_USER: "photoprism" # MariaDB database user name
PHOTOPRISM_DATABASE_PASSWORD: "photoprism" # MariaDB database user password
PHOTOPRISM_SITE_CAPTION: "Photos App"
PHOTOPRISM_SITE_DESCRIPTION: "" # meta site description
PHOTOPRISM_SITE_AUTHOR: "" # meta site author
## Video Transcoding (https://docs.photoprism.app/getting-started/advanced/transcoding/):
# PHOTOPRISM_FFMPEG_ENCODER: "software" # H.264/AVC encoder (software, intel, nvidia, apple, raspberry, or vaapi)
# PHOTOPRISM_FFMPEG_SIZE: "1920" # video size limit in pixels (720-7680) (default: 3840)
# PHOTOPRISM_FFMPEG_BITRATE: "32" # video bitrate limit in Mbit/s (default: 50)
working_dir: "/photoprism" # do not change or remove
## Storage Folders: use "/" not "" as separator, "~" is a shortcut for C:/user/{username}, "." for the current directory
volumes:
# "C:/user/username/folder:/photoprism/folder" # example
- "/srv/dev-disk-by-xxxxxx/backyup/xxxxxx:/photoprism/originals" # original media files (photos and videos)
# - "D:/example/family:/photoprism/originals/family" # additional media folders can be mounted like this
# - "E:/:/photoprism/import" # optional base folder from which files can be imported to originals
- "/srv/dev-disk-by-uuid-xxxxxx/backyup/xxxxxx/storage:/photoprism/storage" # writable storage folder for cache, database, and sidecar files (never remove)
networks:
- podmanhere
`
the network name "podman" i used above i got from the inspect command of the first instance. whatever network i use in second instance compose file the second instance seems to be using default network only.
Beta Was this translation helpful? Give feedback.
All reactions