Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:photoview [2024/10/15 13:01] – willy | services:photoview [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PhotoView ====== | ||
- | |||
- | [[https:// | ||
- | |||
- | ===== Installation ===== | ||
- | |||
- | Create user: | ||
- | |||
- | <code bash> | ||
- | useradd -d / | ||
- | </ | ||
- | |||
- | Create the **docker-compose.yml**: | ||
- | <file - docker-compose.yml> | ||
- | services: | ||
- | photoview: | ||
- | image: viktorstrate/ | ||
- | hostname: photoview | ||
- | container_name: | ||
- | ports: | ||
- | - " | ||
- | depends_on: | ||
- | mariadb: | ||
- | environment: | ||
- | PUID: 0 | ||
- | PGID: 0 | ||
- | PHOTOVIEW_DATABASE_DRIVER: | ||
- | ## Comment out the next variable in the case PHOTOVIEW_DATABASE_DRIVER is set to `sqlite` or `postgres` in the .env | ||
- | PHOTOVIEW_MYSQL_URL: | ||
- | PHOTOVIEW_LISTEN_IP: | ||
- | MAPBOX_TOKEN: | ||
- | PHOTOVIEW_LISTEN_PORT: | ||
- | volumes: | ||
- | - "/ | ||
- | - "/ | ||
- | - "/ | ||
- | - "/ | ||
- | networks: | ||
- | - photoview-net | ||
- | |||
- | mariadb: | ||
- | networks: | ||
- | - photoview-net | ||
- | image: mariadb:lts | ||
- | hostname: photoview-mariadb | ||
- | container_name: | ||
- | restart: unless-stopped | ||
- | stop_grace_period: | ||
- | command: mariadbd --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 | ||
- | security_opt: | ||
- | - seccomp: | ||
- | - apparmor: | ||
- | environment: | ||
- | MARIADB_AUTO_UPGRADE: | ||
- | MARIADB_DATABASE: | ||
- | MARIADB_USER: | ||
- | MARIADB_PASSWORD: | ||
- | MARIADB_ROOT_PASSWORD: | ||
- | volumes: | ||
- | - "/ | ||
- | - "/ | ||
- | - "/ | ||
- | |||
- | networks: | ||
- | photoview-net: | ||
- | </ | ||
- | |||
- | You will need to setup some meaningful passwords for the database, and provide the proper paths. | ||
- | |||
- | Also generate your MapBox token ([[https:// | ||
- | |||
- | Now pull the images: | ||
- | <code bash> | ||
- | su - photoview | ||
- | podman compose pull | ||
- | </ | ||
- | |||
- | ===== Reverse Proxy ===== | ||
- | |||
- | I placed PhotoView on a subdomain, and here is the relevant NGINX config: | ||
- | <file - photoview.conf> | ||
- | server { | ||
- | server_name photos.mydomain.com; | ||
- | listen 443 ssl; | ||
- | listen 8443 ssl; | ||
- | |||
- | access_log / | ||
- | error_log / | ||
- | |||
- | location / { | ||
- | proxy_pass http:// | ||
- | proxy_redirect | ||
- | proxy_set_header | ||
- | proxy_set_header | ||
- | proxy_set_header | ||
- | proxy_set_header | ||
- | proxy_set_header | ||
- | } | ||
- | |||
- | client_max_body_size 100M; | ||
- | } | ||
- | </ | ||
- | |||
- | See [[selfhost: | ||
- | |||
- | ===== Autostart ===== | ||
- | |||
- | To start it, and set it up on boot, as usual follow my indications [[gentoo: | ||
- | < | ||
- | ln -s / | ||
- | </ | ||
- | |||
- | and create the following config file: | ||
- | <file - / | ||
- | USER=photoview | ||
- | DESCRIPTION=" | ||
- | </ | ||
- | |||
- | Add the service to the default runlevel and start it now: | ||
- | <code bash> | ||
- | rc-update add user-containers.photoview default | ||
- | rc-service user-containers.photoview start | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||