name: cardinal-media-server services: app: image: cardinalapps/media-server:stable container_name: cardinal-media-server-app ports: - 24900:24900 environment: - CARDINAL_POSTGRES=true volumes: - app-data:/config - music:/music - photos:/photos - tv-shows:/tv - movies:/movies depends_on: - db links: - db restart: unless-stopped db: image: postgres container_name: cardinal-media-server-db restart: always environment: POSTGRES_USER: ${POSTGRES_USER:-admin} POSTGRES_DB: ${POSTGRES_DB:-cardinal} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-puW6KHfe3viQRyR7} ports: - 24910:5432 volumes: - db-data:/var/lib/postgresql healthcheck: test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ] interval: 10s timeout: 5s retries: 5 volumes: app-data: {} music: driver: local driver_opts: type: "none" o: "bind" device: "/nfs/media/music" photos: driver: local driver_opts: type: "none" o: "bind" device: "/nfs/media/pictures" tv-shows: driver: local driver_opts: type: "none" o: "bind" device: "/nfs/media/tv-shows" movies: driver: local driver_opts: type: "none" o: "bind" device: "/nfs/media/movies" db-data: {}