fix
This commit is contained in:
5
photoview/.env
Normal file
5
photoview/.env
Normal file
@@ -0,0 +1,5 @@
|
||||
HOST_PHOTOVIEW_LOCATION="/root/photoview"
|
||||
PHOTOVIEW_PORT="2283"
|
||||
HOST_PHOTOVIEW_MEDIA_ROOT="/mnt/images"
|
||||
PHOTOVIEW_DATABASE_DRIVER="sqlite"
|
||||
PHOTOVIEW_SQLITE_PATH="/home/photoview/database/photoview.db"
|
||||
@@ -26,33 +26,17 @@ services:
|
||||
- api_db_net
|
||||
ports:
|
||||
- "${PHOTOVIEW_PORT}:80" ## HTTP port (host:container)
|
||||
## Comment out the entire `depends_on` section if PHOTOVIEW_DATABASE_DRIVER is set to `sqlite` in the .env
|
||||
# depends_on:
|
||||
# photoview-prepare:
|
||||
# condition: service_completed_successfully
|
||||
# mariadb:
|
||||
# condition: service_healthy
|
||||
## Security options for some restricted systems
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
- apparmor:unconfined
|
||||
environment:
|
||||
PHOTOVIEW_DATABASE_DRIVER: ${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: "${MARIADB_USER}:${MARIADB_PASSWORD}@tcp(photoview-mariadb)/${MARIADB_DATABASE}"
|
||||
## Uncomment the next line if PHOTOVIEW_DATABASE_DRIVER is set to `sqlite` in the .env
|
||||
# PHOTOVIEW_SQLITE_PATH: ${PHOTOVIEW_SQLITE_PATH}
|
||||
## Uncomment the next variable if set in the `.env` file
|
||||
# PHOTOVIEW_UI_ENDPOINTS: ${PHOTOVIEW_UI_ENDPOINTS}
|
||||
PHOTOVIEW_SQLITE_PATH: ${PHOTOVIEW_SQLITE_PATH}
|
||||
PHOTOVIEW_LISTEN_IP: "0.0.0.0"
|
||||
## Optional: To enable map related features, you need to create a mapbox token.
|
||||
## A token can be generated for free here https://account.mapbox.com/access-tokens/
|
||||
## It's a good idea to limit the scope of the token to your own domain, to prevent others from using it.
|
||||
MAPBOX_TOKEN: ${MAPBOX_TOKEN}
|
||||
volumes:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "${HOST_PHOTOVIEW_LOCATION}/timezone.txt:/etc/timezone:ro"
|
||||
## Uncomment the next line if PHOTOVIEW_DATABASE_DRIVER is set to `sqlite` in the .env
|
||||
- "${HOST_PHOTOVIEW_LOCATION}/database:/home/photoview/database"
|
||||
- "${HOST_PHOTOVIEW_LOCATION}/storage:/home/photoview/media-cache"
|
||||
- "${HOST_PHOTOVIEW_MEDIA_ROOT}:/photos:ro"
|
||||
|
||||
@@ -2,3 +2,4 @@ HOST_PHOTOVIEW_LOCATION="/root/photoview"
|
||||
PHOTOVIEW_PORT="2283"
|
||||
HOST_PHOTOVIEW_MEDIA_ROOT="/mnt/images"
|
||||
PHOTOVIEW_DATABASE_DRIVER="sqlite"
|
||||
PHOTOVIEW_SQLITE_PATH="/home/photoview/database/photoview.db"
|
||||
|
||||
25
photoview/fix.sh
Executable file
25
photoview/fix.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker compose down
|
||||
|
||||
msg() {
|
||||
>&2 printf '[*] %s\n' "$*"
|
||||
}
|
||||
|
||||
dir=/mnt/images
|
||||
|
||||
if umount "$dir" ; then
|
||||
msg "unmounted $dir"
|
||||
else
|
||||
msg "failed to unmount $dir!"
|
||||
fi
|
||||
|
||||
if mount "$dir" ; then
|
||||
msg "mounted $dir"
|
||||
else
|
||||
msg "failed to unmount $dir!"
|
||||
fi
|
||||
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
|
||||
Reference in New Issue
Block a user