Skip to content

Commit

Permalink
fixed a few volume issues and added nfs override
Browse files Browse the repository at this point in the history
  • Loading branch information
BladeWDR committed Nov 30, 2023
1 parent 35b50cb commit ecba15c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
35 changes: 35 additions & 0 deletions overrides-available/librephotos-nfs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: '3'

volumes:
librephotos-nfs-scan:
labels:
- remove_volume_on=down
driver_opts:
type: nfs
o: "addr=${LIBREPHOTOS_ROOT_NFS_SERVER:-${NFS_SERVER}},nolock,noatime,soft,rw"
device: ":${LIBREPHOTOS_ROOT_NFS_SERVER_PATH:-${NFS_LIBREPHOTOS_SCAN_PATH}}"
librephotos-nfs-data:
labels:
- remove_volume_on=down
driver_opts:
type: nfs
o: "addr=${LIBREPHOTOS_ROOT_NFS_SERVER:-${NFS_SERVER}},nolock,noatime,soft,rw"
device: ":${LIBREPHOTOS_ROOT_NFS_SERVER_PATH:-${NFS_LIBREPHOTOS_DATA_PATH}}"

services:
proxy:
volumes:
- librephotos-nfs-scan:/data
- librephotos-nfs-data:/protected_media
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
db:
volumes:
- librephotos-nfs-data:/var/lib/postgresql/data
backend:
volumes:
- librephotos-nfs-scan:/data
- librephotos-nfs-data:/protected_media
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/data}/logs:/logs
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/data}/cache:/root/.cache

15 changes: 7 additions & 8 deletions services-available/untested/librephotos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ services:
container_name: ${LIBREPHOTOS_PROXY_CONTAINER_NAME:-librephotos}
restart: ${LIBREPHOTOS_RESTART:-unless-stopped}
volumes:
- ${LIBREPHOTOS_SCAN_DIRECTORY:-./etc/librephotos/data}:/data
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/protected_media}:/protected_media
- ${LIBREPHOTOS_SCAN_DIRECTORY:-./etc/librephotos/pictures}:/data
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/data}/protected_media:/protected_media
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends-on:
Expand Down Expand Up @@ -52,7 +52,7 @@ services:
networks:
- traefik
volumes:
- ${data}/db:/var/lib/postgresql/data
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/data}/db:/var/lib/postgresql/data
command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0
healthcheck:
test: psql -U ${dbUser} -d ${dbName} -c "SELECT 1;"
Expand All @@ -71,11 +71,10 @@ services:
image: reallibrephotos/librephotos:${LIBREPHOTOS_DOCKER_TAG:-latest}
container_name: ${LIBREPHOTOS_BACKEND_CONTAINER_NAME:-librephotos-backend}
volumes:
- ${LIBREPHOTOS_SCAN_DIRECTORY:-./etc/librephotos/data}:/data
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/protected_media}:/protected_media
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/logs}:/logs
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/cache}:/root/.cache
- ${LIBREPHOTOS_CODE_DIRECTORY:-./etc/librephotos/code}:/code
- ${LIBREPHOTOS_SCAN_DIRECTORY:-./etc/librephotos/pictures}:/data
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/data}/protected_media:/protected_media
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/data}/logs:/logs
- ${LIBREPHOTOS_DATA_DIRECTORY:-./etc/librephotos/data}/cache:/root/.cache
networks:
- traefik
environment:
Expand Down

0 comments on commit ecba15c

Please sign in to comment.