chore: Minor fixes.

This commit is contained in:
Laur Ivan 2023-01-21 01:37:43 +01:00
parent f27c4bebc9
commit aa344b6ecb
3 changed files with 21 additions and 10 deletions

View File

@ -53,6 +53,8 @@ photoprism:
disable_webdav: "false" # disables built-in WebDAV server disable_webdav: "false" # disables built-in WebDAV server
disable_settings: "false" # disables settings UI and API disable_settings: "false" # disables settings UI and API
autoupdate: "false" # Update photoprism automatically (true/false)
## Run as a non-root user after initialization (supported: 0, 33, 50-99, 500-600, and 900-1200): ## Run as a non-root user after initialization (supported: 0, 33, 50-99, 500-600, and 900-1200):
uid: "" # PHOTOPRISM_UID: 1000 uid: "" # PHOTOPRISM_UID: 1000
gid: "" # PHOTOPRISM_GID: 1000 gid: "" # PHOTOPRISM_GID: 1000
@ -79,6 +81,8 @@ photoprism:
upload: "true" # allows uploads that MAY be offensive (no effect without TensorFlow) upload: "true" # allows uploads that MAY be offensive (no effect without TensorFlow)
db: db:
image: "mariadb" # Database image
version: "10.10" # Database image version
driver: "mysql" # or "sqlite". Use MariaDB 10.5+ or MySQL 8+ instead of SQLite for improved driver: "mysql" # or "sqlite". Use MariaDB 10.5+ or MySQL 8+ instead of SQLite for improved
host: "mariadb" # MariaDB or MySQL database server (hostname:port) host: "mariadb" # MariaDB or MySQL database server (hostname:port)
port: 3306 port: 3306

View File

@ -14,8 +14,8 @@
- name: "PHOTOPRISM | Write configuration files" - name: "PHOTOPRISM | Write configuration files"
ansible.builtin.template: ansible.builtin.template:
src: "{{ item }}.j2" src: "photoprism/{{ item }}.j2"
dest: "{{ photoprism_config_path | expanduser | realpath }}/{{ item {{" dest: "{{ photoprism_config_path | expanduser | realpath }}/{{ item }}"
mode: '0640' mode: '0640'
loop: loop:
- "docker-compose.yml" - "docker-compose.yml"

View File

@ -56,7 +56,7 @@ services:
ports: ports:
- "{{ photoprism.site.port }}:2342" # HTTP port (host:container) - "{{ photoprism.site.port }}:2342" # HTTP port (host:container)
env_file: env_file:
- "{{ grafana_setup_path | expanduser | realpath }}/photoprism.yml" - "{{ photoprism_config_path | expanduser | realpath }}/photoprism.yml"
working_dir: "/photoprism" # do not change or remove working_dir: "/photoprism" # do not change or remove
## Storage Folders: "~" is a shortcut for your home directory, "." for the current directory ## Storage Folders: "~" is a shortcut for your home directory, "." for the current directory
@ -65,14 +65,16 @@ services:
- "~/Pictures:/photoprism/originals" # Original media files (DO NOT REMOVE) - "~/Pictures:/photoprism/originals" # Original media files (DO NOT REMOVE)
# - "/example/family:/photoprism/originals/family" # *Additional* media folders can be mounted like this # - "/example/family:/photoprism/originals/family" # *Additional* media folders can be mounted like this
# - "~/Import:/photoprism/import" # *Optional* base folder from which files can be imported to originals # - "~/Import:/photoprism/import" # *Optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *Writable* storage folder for cache, database, and sidecar files (DO NOT REMOVE) - "{{ photoprism_cache_path }}:/photoprism/storage" # *Writable* storage folder for cache, database, and sidecar files (DO NOT REMOVE)
{% if photoprism.devices is defined and photoprism.devices|length >= 1 %} {% if photoprism.devices is defined and photoprism.devices|length >= 1 %}
devices: devices:
{% for device in photoprism.devices %} {% for device in photoprism.devices %}
- "{{ device }} - "{{ device }}"
{% endfor %} {% endfor %}
{% endif %} {% endif %}
networks:
- photoprism
## Database Server (recommended) ## Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql ## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
@ -80,19 +82,21 @@ services:
## If MariaDB gets stuck in a restart loop, this points to a memory or filesystem issue: ## If MariaDB gets stuck in a restart loop, this points to a memory or filesystem issue:
## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors ## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors
restart: unless-stopped restart: unless-stopped
image: mariadb:10.10 image: "{{ photoprism.db.image }}:{{ photoprism.db.version }}
env_file: env_file:
- "{{ grafana_setup_path | expanduser | realpath }}/db.yml" - "{{ grafana_setup_path | expanduser | realpath }}/db.yml"
security_opt: # see https://github.com/MariaDB/mariadb-docker/issues/434#issuecomment-1136151239 security_opt: # see https://github.com/MariaDB/mariadb-docker/issues/434#issuecomment-1136151239
- seccomp:unconfined - seccomp:unconfined
- apparmor:unconfined - apparmor:unconfined
command: mysqld --innodb-buffer-pool-size=512M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 command: mysqld --innodb-buffer-pool-size=512M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120
## Never store database files on an unreliable device such as a USB flash drive, an SD card, or a shared network folder: ## Never store database files on an unreliable device such as a USB flash drive,
## an SD card, or a shared network folder:
volumes: volumes:
- "./database:/var/lib/mysql" # DO NOT REMOVE - "{{ photoprism_db_path }}:/var/lib/mysql"
environment: networks:
- photoprism
{% if photoprism.system.autoupdate == "true" %}
## 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
## activate via "COMPOSE_PROFILES=update docker compose up -d" ## activate via "COMPOSE_PROFILES=update docker compose up -d"
@ -106,4 +110,7 @@ services:
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
- "~/.docker/config.json:/config.json" # optional, for authentication if you have a Docker Hub account - "~/.docker/config.json:/config.json" # optional, for authentication if you have a Docker Hub account
{% endif %}
networks:
photoprism: {}