From: seantywork Date: Sat, 19 Jul 2025 14:33:35 +0000 (+0000) Subject: images should be updated X-Git-Url: https://git.feebdaed.xyz/?a=commitdiff_plain;h=2e39f7f35c6c8940b878d4ea2be6820fa4e68d55;p=lgtm-rsvp.git images should be updated --- diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d70ebaa --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +public \ No newline at end of file diff --git a/README.md b/README.md index 10ee8ce..824bfbf 100644 --- a/README.md +++ b/README.md @@ -109,8 +109,21 @@ podman login ``` +11. Place "album" under public/images/album -11. Run! +The folder name should be exactly "album". + +The folder should contain at least three images + +- title image +- groom +- bride + +and needs to be sorted in that exac order. + +All other images will be displayed under "Gallery" sector. + +12. Run! ```shell diff --git a/config.yaml.tmpl b/config.yaml.tmpl index 38918d4..74097cc 100644 --- a/config.yaml.tmpl +++ b/config.yaml.tmpl @@ -18,11 +18,6 @@ admin: useOauth2: false id: seantywork@gmail.com pw: sample -# the path under which folder named "album" is placed -# album should contain at least three images -# for title, groom, bride in that order -album: - addr: "public/images" title: "Taehoon & Suya" groom: "윤태훈" bride: "반수야" diff --git a/docker.sh b/docker.sh index dc21af7..0796e97 100755 --- a/docker.sh +++ b/docker.sh @@ -24,4 +24,5 @@ podman run -d --restart=always \ -p 8080:8080 \ -v ./data:/workspace/data \ -v ./log:/workspace/log \ + -v ./public:/workspace/public localhost/our-wedding-rsvp \ No newline at end of file diff --git a/pkg/glob/glob.go b/pkg/glob/glob.go index 77daf49..efc34bc 100644 --- a/pkg/glob/glob.go +++ b/pkg/glob/glob.go @@ -14,9 +14,6 @@ type Config struct { Id string `yaml:"id"` Pw string `yaml:"pw"` } `yaml:"admin"` - Album struct { - Addr string `yaml:"addr"` - } Title string `yaml:"title"` Groom string `yaml:"groom"` Bride string `yaml:"bride"` diff --git a/pkg/server/server.go b/pkg/server/server.go index 1fe7b1a..7a6dae6 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -6,7 +6,6 @@ import ( "os" pkgserverapi "our-wedding-rsvp/pkg/server/api" "path/filepath" - "strings" pkgauth "our-wedding-rsvp/pkg/auth" pkgglob "our-wedding-rsvp/pkg/glob" @@ -80,11 +79,7 @@ func CreateServerFromConfig() (*gin.Engine, error) { func configureServer(e *gin.Engine) error { - if !strings.HasPrefix(pkgglob.G_CONF.Album.Addr, "public/") { - return fmt.Errorf("album addr needs to start with 'public' prefix") - } - - albumPath := filepath.Join(pkgglob.G_CONF.Album.Addr, "album") + albumPath := "./public/images/album" if _, err := os.Stat(albumPath); err != nil { return fmt.Errorf("album addr not found: %v", err)