Files
homelab/photoview/docker-compose.yml
2026-02-28 07:36:36 -06:00

51 lines
1.5 KiB
YAML

services:
## Makes sure that the media cache folder is created with the correct permissions
photoview-prepare:
image: photoview/photoview:latest
hostname: photoview-prepare
container_name: photoview-prepare
network_mode: "none"
user: root
entrypoint: []
command: /bin/bash -c "sleep 1 && chown -R photoview:photoview /home/photoview/media-cache"
cap_add:
- CHOWN
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "${HOST_PHOTOVIEW_LOCATION}/timezone.txt:/etc/timezone:ro"
- "${HOST_PHOTOVIEW_LOCATION}/storage:/home/photoview/media-cache"
photoview:
image: photoview/photoview:latest
hostname: photoview
container_name: photoview
restart: unless-stopped
stop_grace_period: 10s
networks:
- ui_net
- api_db_net
ports:
- "${PHOTOVIEW_PORT}:80" ## HTTP port (host:container)
security_opt:
- seccomp:unconfined
- apparmor:unconfined
environment:
PHOTOVIEW_DATABASE_DRIVER: ${PHOTOVIEW_DATABASE_DRIVER}
PHOTOVIEW_SQLITE_PATH: ${PHOTOVIEW_SQLITE_PATH}
PHOTOVIEW_LISTEN_IP: "0.0.0.0"
MAPBOX_TOKEN: ${MAPBOX_TOKEN}
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "${HOST_PHOTOVIEW_LOCATION}/timezone.txt:/etc/timezone:ro"
- "${HOST_PHOTOVIEW_LOCATION}/database:/home/photoview/database"
- "${HOST_PHOTOVIEW_LOCATION}/storage:/home/photoview/media-cache"
- "${HOST_PHOTOVIEW_MEDIA_ROOT}:/photos:ro"
networks:
ui_net:
driver: bridge
api_db_net:
internal: true