Skip to content

Commit

Permalink
FIX: bind address for docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
rigon committed Jun 13, 2023
1 parent b6314ed commit abc644f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ VOLUME "/photos" "/thumbs"
RUN apk update && apk add ffmpeg-libs
COPY --from=frontend /app/build /app/build/
COPY --from=server /app/photo-gallery /app/server/photo-gallery
ENTRYPOINT ["./photo-gallery"]
ENTRYPOINT ["./photo-gallery", "--host", "0.0.0.0"]
CMD ["-r", "-c", "name=Photos,path=/photos,thumbs=/thumbs"]
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "photo-gallery",
"private": true,
"version": "1.3.1",
"version": "1.3.2",
"type": "module",
"scripts": {
"start": "vite",
Expand Down
7 changes: 4 additions & 3 deletions server/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ func (c *Collection) Info() CollectionInfo {

// Lists all albums, however photos are not loaded together.
// For that use Album.GetPhotos()
func (c *Collection) GetAlbums() (albums []*Album, err error) {
func (c *Collection) GetAlbums() ([]*Album, error) {
albums := make([]*Album, 0)
files, err := ioutil.ReadDir(c.PhotosPath)
if err != nil {
return
return nil, err
}

for _, file := range files {
Expand All @@ -85,7 +86,7 @@ func (c *Collection) GetAlbums() (albums []*Album, err error) {
}
// Save to cache in background
c.cache.SetListAlbums(albums...)
return
return albums, nil
}

func (c *Collection) IsAlbum(albumName string) bool {
Expand Down

0 comments on commit abc644f

Please sign in to comment.