]> git.feebdaed.xyz Git - lgtm-rsvp.git/commitdiff
images should be updated
authorseantywork <seantywork@gmail.com>
Sat, 19 Jul 2025 14:33:35 +0000 (14:33 +0000)
committerseantywork <seantywork@gmail.com>
Sat, 19 Jul 2025 14:33:35 +0000 (14:33 +0000)
.dockerignore [new file with mode: 0644]
README.md
config.yaml.tmpl
docker.sh
pkg/glob/glob.go
pkg/server/server.go

diff --git a/.dockerignore b/.dockerignore
new file mode 100644 (file)
index 0000000..d70ebaa
--- /dev/null
@@ -0,0 +1 @@
+public
\ No newline at end of file
index 10ee8ce96e3c11801523d9213b657ec13ccf5e46..824bfbf2df280fedbc80ee80614fe118135e8293 100644 (file)
--- 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
 
index 38918d40d09eab9a7c4ba0871a223f69c9d914cd..74097cc1ab7a3eb30111830aa04352a813744e2a 100644 (file)
@@ -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: "반수야"
index dc21af7c23b9c55d8abe1d1b03aba363ee04cfc8..0796e9720138cd9b71aee01bf169d742cc8caa42 100755 (executable)
--- 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
index 77daf49644144040645e85560cca247f0000f33d..efc34bc82b290a684f002ef95d5314e3306efbf9 100644 (file)
@@ -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"`
index 1fe7b1a518276eed947d196f466366b033151775..7a6dae60edcae49cbf9d4824df571b83b0409491 100644 (file)
@@ -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)